<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE BangPatterns #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE FlexibleContexts #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-4"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-5"></span><span>
</span><span id="line-6"></span><span class="hs-pragma">{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}</span><span>
</span><span id="line-7"></span><span>
</span><span id="line-8"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- The register liveness determinator</span><span>
</span><span id="line-11"></span><span class="hs-comment">--</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- (c) The University of Glasgow 2004-2013</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.CmmToAsm.Reg.Liveness</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-17"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier">RegSet</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegMap"><span class="hs-identifier">RegMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#emptyRegMap"><span class="hs-identifier">emptyRegMap</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier">BlockMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier">mapEmpty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier">LiveCmmDecl</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#InstrSR"><span class="hs-identifier">InstrSR</span></a></span><span>   </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-23"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Liveness"><span class="hs-identifier">Liveness</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-24"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier">LiveInfo</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-25"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier">LiveBasicBlock</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-26"></span><span>
</span><span id="line-27"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTop"><span class="hs-identifier">mapBlockTop</span></a></span><span class="hs-special">,</span><span>    </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTopM"><span class="hs-identifier">mapBlockTopM</span></a></span><span class="hs-special">,</span><span>   </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapSCCM"><span class="hs-identifier">mapSCCM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-28"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTop"><span class="hs-identifier">mapGenBlockTop</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTopM"><span class="hs-identifier">mapGenBlockTopM</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-29"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLive"><span class="hs-identifier">stripLive</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-30"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLiveBlock"><span class="hs-identifier">stripLiveBlock</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-31"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#slurpConflicts"><span class="hs-identifier">slurpConflicts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-32"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#slurpReloadCoalesce"><span class="hs-identifier">slurpReloadCoalesce</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-33"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#eraseDeltasLive"><span class="hs-identifier">eraseDeltasLive</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-34"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#patchEraseLive"><span class="hs-identifier">patchEraseLive</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-35"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#patchRegsLiveInstr"><span class="hs-identifier">patchRegsLiveInstr</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-36"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#reverseBlocksInTops"><span class="hs-identifier">reverseBlocksInTops</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-37"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#regLiveness"><span class="hs-identifier">regLiveness</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-38"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#cmmTopLiveness"><span class="hs-identifier">cmmTopLiveness</span></a></span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html"><span class="hs-identifier">GHC.Platform.Reg</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html"><span class="hs-identifier">GHC.CmmToAsm.Instr</span></a></span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html"><span class="hs-identifier">GHC.CmmToAsm.CFG</span></a></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html"><span class="hs-identifier">GHC.CmmToAsm.Config</span></a></span><span>
</span><span id="line-46"></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html"><span class="hs-identifier">GHC.Cmm.BlockId</span></a></span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Collections.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Collections</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html"><span class="hs-identifier">GHC.Cmm.Dataflow.Label</span></a></span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Cmm.html"><span class="hs-identifier">GHC.Cmm</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Expr.html#RegSet"><span class="hs-identifier">RegSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Cmm.Expr.html#emptyRegSet"><span class="hs-identifier">emptyRegSet</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Directed.html"><span class="hs-identifier">GHC.Data.Graph.Directed</span></a></span><span>
</span><span id="line-53"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.html"><span class="hs-identifier">GHC.Utils.Monad</span></a></span><span>
</span><span id="line-54"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-55"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-56"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html"><span class="hs-identifier">GHC.Types.Unique.Set</span></a></span><span>
</span><span id="line-57"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html"><span class="hs-identifier">GHC.Types.Unique.FM</span></a></span><span>
</span><span id="line-58"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html"><span class="hs-identifier">GHC.Types.Unique.Supply</span></a></span><span>
</span><span id="line-59"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html"><span class="hs-identifier">GHC.Data.Bag</span></a></span><span>
</span><span id="line-60"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html"><span class="hs-identifier">GHC.Utils.Monad.State</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>
</span><span id="line-63"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-64"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../containers/src/Data.IntSet.html#"><span class="hs-identifier">Data.IntSet</span></a></span><span>              </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.IntSet.Internal.html#IntSet"><span class="hs-identifier">IntSet</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-67"></span><span class="hs-keyword">type</span><span> </span><span id="RegSet"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-var">RegSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-68"></span><span>
</span><span id="line-69"></span><span class="hs-comment">-- | Map from some kind of register to a.</span><span>
</span><span id="line-70"></span><span class="hs-comment">--</span><span>
</span><span id="line-71"></span><span class="hs-comment">-- While we give the type for keys as Reg which is the common case</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- sometimes we end up using VirtualReq or naked Uniques.</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- See Note [UniqFM and the register allocator]</span><span>
</span><span id="line-74"></span><span class="hs-keyword">type</span><span> </span><span id="RegMap"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegMap"><span class="hs-identifier hs-var">RegMap</span></a></span></span><span> </span><span id="local-6989586621681022633"><span class="annot"><a href="#local-6989586621681022633"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022633"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-75"></span><span>
</span><span id="line-76"></span><span id="local-6989586621681022978"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#emptyRegMap"><span class="hs-identifier hs-type">emptyRegMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegMap"><span class="hs-identifier hs-type">RegMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022978"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-77"></span><span id="emptyRegMap"><span class="annot"><span class="annottext">emptyRegMap :: forall a. RegMap a
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#emptyRegMap"><span class="hs-identifier hs-var hs-var">emptyRegMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqFM Reg a
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-78"></span><span>
</span><span id="line-79"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#emptyRegSet"><span class="hs-identifier hs-type">emptyRegSet</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>
</span><span id="line-80"></span><span id="emptyRegSet"><span class="annot"><span class="annottext">emptyRegSet :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#emptyRegSet"><span class="hs-identifier hs-var hs-var">emptyRegSet</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span class="hs-keyword">type</span><span> </span><span id="BlockMap"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-var">BlockMap</span></a></span></span><span> </span><span id="local-6989586621681022629"><span class="annot"><a href="#local-6989586621681022629"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022629"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-83"></span><span>
</span><span id="line-84"></span><span class="hs-keyword">type</span><span> </span><span id="SlotMap"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-var">SlotMap</span></a></span></span><span> </span><span id="local-6989586621681022628"><span class="annot"><a href="#local-6989586621681022628"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Slot"><span class="hs-identifier hs-type">Slot</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022628"><span class="hs-identifier hs-type">a</span></a></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-keyword">type</span><span> </span><span id="Slot"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Slot"><span class="hs-identifier hs-var">Slot</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-comment">-- | A top level thing which carries liveness information.</span><span>
</span><span id="line-89"></span><span class="hs-keyword">type</span><span> </span><span id="LiveCmmDecl"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-var">LiveCmmDecl</span></a></span></span><span> </span><span id="local-6989586621681022626"><span class="annot"><a href="#local-6989586621681022626"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681022625"><span class="annot"><a href="#local-6989586621681022625"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-90"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span>
</span><span id="line-91"></span><span>                </span><span class="annot"><a href="#local-6989586621681022626"><span class="hs-identifier hs-type">statics</span></a></span><span>
</span><span id="line-92"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span>
</span><span id="line-93"></span><span>                </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022625"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | The register allocator also wants to use SPILL/RELOAD meta instructions,</span><span>
</span><span id="line-97"></span><span class="hs-comment">--   so we'll keep those here.</span><span>
</span><span id="line-98"></span><span class="hs-keyword">data</span><span> </span><span id="InstrSR"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#InstrSR"><span class="hs-identifier hs-var">InstrSR</span></a></span></span><span> </span><span id="local-6989586621681022959"><span class="annot"><a href="#local-6989586621681022959"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-99"></span><span>        </span><span class="hs-comment">-- | A real machine instruction</span><span>
</span><span id="line-100"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="Instr"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span></span><span>  </span><span class="annot"><a href="#local-6989586621681022959"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span>        </span><span class="hs-comment">-- | spill this reg to a stack slot</span><span>
</span><span id="line-103"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="SPILL"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-var">SPILL</span></a></span></span><span>  </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span>        </span><span class="hs-comment">-- | reload this reg from a stack slot</span><span>
</span><span id="line-106"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span id="RELOAD"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-var">RELOAD</span></a></span></span><span> </span><span class="annot"><span class="hs-identifier hs-type">Int</span></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span id="local-6989586621681022961"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022961"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#InstrSR"><span class="hs-identifier hs-type">InstrSR</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022961"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-109"></span><span>        </span><span id="local-6989586621681022603"><span class="annot"><span class="annottext">regUsageOfInstr :: Platform -&gt; InstrSR instr -&gt; RegUsage
</span><a href="GHC.CmmToAsm.Instr.html#regUsageOfInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">regUsageOfInstr</span></a></span></span><span> </span><span id="local-6989586621681022601"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022601"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681022600"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022600"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-110"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022600"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-111"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span>  </span><span id="local-6989586621681022599"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022599"><span class="hs-identifier hs-var">instr</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; instr -&gt; RegUsage
forall instr. Instruction instr =&gt; Platform -&gt; instr -&gt; RegUsage
</span><a href="GHC.CmmToAsm.Instr.html#regUsageOfInstr"><span class="hs-identifier hs-var">regUsageOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022601"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022599"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-112"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-type">SPILL</span></a></span><span>  </span><span id="local-6989586621681022598"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022598"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; RegUsage
</span><a href="GHC.CmmToAsm.Instr.html#RU"><span class="hs-identifier hs-var">RU</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022598"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-113"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-type">RELOAD</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681022596"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022596"><span class="hs-identifier hs-var">reg</span></a></span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; [Reg] -&gt; RegUsage
</span><a href="GHC.CmmToAsm.Instr.html#RU"><span class="hs-identifier hs-var">RU</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022596"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span>        </span><span id="local-6989586621681022594"><span class="annot"><span class="annottext">patchRegsOfInstr :: InstrSR instr -&gt; (Reg -&gt; Reg) -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Instr.html#patchRegsOfInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">patchRegsOfInstr</span></a></span></span><span> </span><span id="local-6989586621681022592"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022592"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681022591"><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022591"><span class="hs-identifier hs-var">f</span></a></span></span><span>
</span><span id="line-116"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022592"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-117"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022590"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022590"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">instr -&gt; (Reg -&gt; Reg) -&gt; instr
forall instr. Instruction instr =&gt; instr -&gt; (Reg -&gt; Reg) -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#patchRegsOfInstr"><span class="hs-identifier hs-var">patchRegsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022590"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022591"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-118"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-type">SPILL</span></a></span><span>  </span><span id="local-6989586621681022589"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022589"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681022588"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022588"><span class="hs-identifier hs-var">slot</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Int -&gt; InstrSR instr
forall instr. Reg -&gt; Int -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-var">SPILL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022591"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022589"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022588"><span class="hs-identifier hs-var">slot</span></a></span><span>
</span><span id="line-119"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-type">RELOAD</span></a></span><span> </span><span id="local-6989586621681022587"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022587"><span class="hs-identifier hs-var">slot</span></a></span></span><span> </span><span id="local-6989586621681022586"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022586"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Reg -&gt; InstrSR instr
forall instr. Int -&gt; Reg -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-var">RELOAD</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022587"><span class="hs-identifier hs-var">slot</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022591"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022586"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-120"></span><span>
</span><span id="line-121"></span><span>        </span><span id="local-6989586621681022584"><span class="annot"><span class="annottext">isJumpishInstr :: InstrSR instr -&gt; Bool
</span><a href="GHC.CmmToAsm.Instr.html#isJumpishInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">isJumpishInstr</span></a></span></span><span> </span><span id="local-6989586621681022582"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022582"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-122"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022582"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-123"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022581"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022581"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; Bool
forall instr. Instruction instr =&gt; instr -&gt; Bool
</span><a href="GHC.CmmToAsm.Instr.html#isJumpishInstr"><span class="hs-identifier hs-var">isJumpishInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022581"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-124"></span><span>                </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-125"></span><span>
</span><span id="line-126"></span><span>        </span><span id="local-6989586621681022579"><span class="annot"><span class="annottext">jumpDestsOfInstr :: InstrSR instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#jumpDestsOfInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">jumpDestsOfInstr</span></a></span></span><span> </span><span id="local-6989586621681022577"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022577"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-127"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022577"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-128"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022576"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022576"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; [BlockId]
forall instr. Instruction instr =&gt; instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#jumpDestsOfInstr"><span class="hs-identifier hs-var">jumpDestsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022576"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-129"></span><span>                </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-130"></span><span>
</span><span id="line-131"></span><span>        </span><span id="local-6989586621681022574"><span class="annot"><span class="annottext">patchJumpInstr :: InstrSR instr -&gt; (BlockId -&gt; BlockId) -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Instr.html#patchJumpInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">patchJumpInstr</span></a></span></span><span> </span><span id="local-6989586621681022572"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022572"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681022571"><span class="annot"><span class="annottext">BlockId -&gt; BlockId
</span><a href="#local-6989586621681022571"><span class="hs-identifier hs-var">f</span></a></span></span><span>
</span><span id="line-132"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022572"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-133"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022570"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022570"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">instr -&gt; (BlockId -&gt; BlockId) -&gt; instr
forall instr.
Instruction instr =&gt;
instr -&gt; (BlockId -&gt; BlockId) -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#patchJumpInstr"><span class="hs-identifier hs-var">patchJumpInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022570"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; BlockId
</span><a href="#local-6989586621681022571"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-134"></span><span>                </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022572"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-135"></span><span>
</span><span id="line-136"></span><span>        </span><span id="local-6989586621681022567"><span class="annot"><span class="annottext">mkSpillInstr :: NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Instr.html#mkSpillInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">mkSpillInstr</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; InstrSR instr
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;mkSpillInstr[InstrSR]: Not making SPILL meta-instr&quot;</span></span><span>
</span><span id="line-137"></span><span>        </span><span id="local-6989586621681022562"><span class="annot"><span class="annottext">mkLoadInstr :: NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Instr.html#mkLoadInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">mkLoadInstr</span></a></span></span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; InstrSR instr
forall a. HasCallStack =&gt; [Char] -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;mkLoadInstr[InstrSR]: Not making LOAD meta-instr&quot;</span></span><span>
</span><span id="line-138"></span><span>
</span><span id="line-139"></span><span>        </span><span id="local-6989586621681022559"><span class="annot"><span class="annottext">takeDeltaInstr :: InstrSR instr -&gt; Maybe Int
</span><a href="GHC.CmmToAsm.Instr.html#takeDeltaInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">takeDeltaInstr</span></a></span></span><span> </span><span id="local-6989586621681022557"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022557"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-140"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022557"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-141"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022556"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022556"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; Maybe Int
forall instr. Instruction instr =&gt; instr -&gt; Maybe Int
</span><a href="GHC.CmmToAsm.Instr.html#takeDeltaInstr"><span class="hs-identifier hs-var">takeDeltaInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022556"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-142"></span><span>                </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span>        </span><span id="local-6989586621681022554"><span class="annot"><span class="annottext">isMetaInstr :: InstrSR instr -&gt; Bool
</span><a href="GHC.CmmToAsm.Instr.html#isMetaInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">isMetaInstr</span></a></span></span><span> </span><span id="local-6989586621681022552"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022552"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-145"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022552"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-146"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022551"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022551"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; Bool
forall instr. Instruction instr =&gt; instr -&gt; Bool
</span><a href="GHC.CmmToAsm.Instr.html#isMetaInstr"><span class="hs-identifier hs-var">isMetaInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022551"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-147"></span><span>                </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span>        </span><span id="local-6989586621681022549"><span class="annot"><span class="annottext">mkRegRegMoveInstr :: Platform -&gt; Reg -&gt; Reg -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Instr.html#mkRegRegMoveInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">mkRegRegMoveInstr</span></a></span></span><span> </span><span id="local-6989586621681022547"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022547"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681022546"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022546"><span class="hs-identifier hs-var">r1</span></a></span></span><span> </span><span id="local-6989586621681022545"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022545"><span class="hs-identifier hs-var">r2</span></a></span></span><span>
</span><span id="line-150"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; Reg -&gt; Reg -&gt; instr
forall instr. Instruction instr =&gt; Platform -&gt; Reg -&gt; Reg -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#mkRegRegMoveInstr"><span class="hs-identifier hs-var">mkRegRegMoveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022547"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022546"><span class="hs-identifier hs-var">r1</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022545"><span class="hs-identifier hs-var">r2</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>
</span><span id="line-152"></span><span>        </span><span id="local-6989586621681022543"><span class="annot"><span class="annottext">takeRegRegMoveInstr :: InstrSR instr -&gt; Maybe (Reg, Reg)
</span><a href="GHC.CmmToAsm.Instr.html#takeRegRegMoveInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">takeRegRegMoveInstr</span></a></span></span><span> </span><span id="local-6989586621681022541"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022541"><span class="hs-identifier hs-var">i</span></a></span></span><span>
</span><span id="line-153"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022541"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-154"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022540"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022540"><span class="hs-identifier hs-var">instr</span></a></span></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">instr -&gt; Maybe (Reg, Reg)
forall instr. Instruction instr =&gt; instr -&gt; Maybe (Reg, Reg)
</span><a href="GHC.CmmToAsm.Instr.html#takeRegRegMoveInstr"><span class="hs-identifier hs-var">takeRegRegMoveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022540"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-155"></span><span>                </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span>               </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-156"></span><span>
</span><span id="line-157"></span><span>        </span><span id="local-6989586621681022538"><span class="annot"><span class="annottext">mkJumpInstr :: BlockId -&gt; [InstrSR instr]
</span><a href="GHC.CmmToAsm.Instr.html#mkJumpInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">mkJumpInstr</span></a></span></span><span> </span><span id="local-6989586621681022536"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022536"><span class="hs-identifier hs-var">target</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(instr -&gt; InstrSR instr) -&gt; [instr] -&gt; [InstrSR instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; [instr]
forall instr. Instruction instr =&gt; BlockId -&gt; [instr]
</span><a href="GHC.CmmToAsm.Instr.html#mkJumpInstr"><span class="hs-identifier hs-var">mkJumpInstr</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022536"><span class="hs-identifier hs-var">target</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-158"></span><span>
</span><span id="line-159"></span><span>        </span><span id="local-6989586621681022532"><span class="annot"><span class="annottext">mkStackAllocInstr :: Platform -&gt; Int -&gt; [InstrSR instr]
</span><a href="GHC.CmmToAsm.Instr.html#mkStackAllocInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">mkStackAllocInstr</span></a></span></span><span> </span><span id="local-6989586621681022530"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022530"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681022529"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022529"><span class="hs-identifier hs-var">amount</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-160"></span><span>             </span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="annot"><span class="annottext">(instr -&gt; InstrSR instr) -&gt; [instr] -&gt; [InstrSR instr]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; [instr]
forall instr. Instruction instr =&gt; Platform -&gt; Int -&gt; [instr]
</span><a href="GHC.CmmToAsm.Instr.html#mkStackAllocInstr"><span class="hs-identifier hs-var">mkStackAllocInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022530"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022529"><span class="hs-identifier hs-var">amount</span></a></span><span>
</span><span id="line-161"></span><span>
</span><span id="line-162"></span><span>        </span><span id="local-6989586621681022525"><span class="annot"><span class="annottext">mkStackDeallocInstr :: Platform -&gt; Int -&gt; [InstrSR instr]
</span><a href="GHC.CmmToAsm.Instr.html#mkStackDeallocInstr"><span class="hs-identifier hs-var hs-var hs-var hs-var">mkStackDeallocInstr</span></a></span></span><span> </span><span id="local-6989586621681022523"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022523"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681022522"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022522"><span class="hs-identifier hs-var">amount</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-163"></span><span>             </span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="annot"><span class="annottext">(instr -&gt; InstrSR instr) -&gt; [instr] -&gt; [InstrSR instr]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; Int -&gt; [instr]
forall instr. Instruction instr =&gt; Platform -&gt; Int -&gt; [instr]
</span><a href="GHC.CmmToAsm.Instr.html#mkStackDeallocInstr"><span class="hs-identifier hs-var">mkStackDeallocInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022523"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022522"><span class="hs-identifier hs-var">amount</span></a></span></span><span>
</span><span id="line-164"></span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-comment">-- | An instruction with liveness information.</span><span>
</span><span id="line-167"></span><span class="hs-keyword">data</span><span> </span><span id="LiveInstr"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span></span><span> </span><span id="local-6989586621681022758"><span class="annot"><a href="#local-6989586621681022758"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-168"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="LiveInstr"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#InstrSR"><span class="hs-identifier hs-type">InstrSR</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022758"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Liveness"><span class="hs-identifier hs-type">Liveness</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>
</span><span id="line-170"></span><span class="hs-comment">-- | Liveness information.</span><span>
</span><span id="line-171"></span><span class="hs-comment">--   The regs which die are ones which are no longer live in the *next* instruction</span><span>
</span><span id="line-172"></span><span class="hs-comment">--   in this sequence.</span><span>
</span><span id="line-173"></span><span class="hs-comment">--   (NB. if the instruction is a jump, these registers might still be live</span><span>
</span><span id="line-174"></span><span class="hs-comment">--   at the jump target(s) - you have to check the liveness at the destination</span><span>
</span><span id="line-175"></span><span class="hs-comment">--   block to find out).</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-keyword">data</span><span> </span><span id="Liveness"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Liveness"><span class="hs-identifier hs-var">Liveness</span></a></span></span><span>
</span><span id="line-178"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="Liveness"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Liveness"><span class="hs-identifier hs-var">Liveness</span></a></span></span><span>
</span><span id="line-179"></span><span>        </span><span class="hs-special">{</span><span> </span><span id="liveBorn"><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var hs-var">liveBorn</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>       </span><span class="hs-comment">-- ^ registers born in this instruction (written to for first time).</span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="liveDieRead"><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span></span><span>   </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>       </span><span class="hs-comment">-- ^ registers that died because they were read for the last time.</span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-special">,</span><span> </span><span id="liveDieWrite"><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span> </span><span class="hs-special">}</span><span>     </span><span class="hs-comment">-- ^ registers that died because they were clobbered by something.</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-comment">-- | Stash regs live on entry to each basic block in the info part of the cmm code.</span><span>
</span><span id="line-185"></span><span class="hs-keyword">data</span><span> </span><span id="LiveInfo"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span></span><span>
</span><span id="line-186"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span id="LiveInfo"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span></span><span>
</span><span id="line-187"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelMap"><span class="hs-identifier hs-type">LabelMap</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.html#RawCmmStatics"><span class="hs-identifier hs-type">RawCmmStatics</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- cmm info table static stuff</span><span>
</span><span id="line-188"></span><span>                </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">]</span><span>                 </span><span class="hs-comment">-- entry points (first one is the</span><span>
</span><span id="line-189"></span><span>                                          </span><span class="hs-comment">-- entry point for the proc).</span><span>
</span><span id="line-190"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">)</span><span>         </span><span class="hs-comment">-- argument locals live on entry to this block</span><span>
</span><span id="line-191"></span><span>                </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="../../containers/src/Data.IntSet.Internal.html#IntSet"><span class="hs-identifier hs-type">IntSet</span></a></span><span class="hs-special">)</span><span>         </span><span class="hs-comment">-- stack slots live on entry to this block</span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- | A basic block with liveness information.</span><span>
</span><span id="line-195"></span><span class="hs-keyword">type</span><span> </span><span id="LiveBasicBlock"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-var">LiveBasicBlock</span></a></span></span><span> </span><span id="local-6989586621681022515"><span class="annot"><a href="#local-6989586621681022515"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-196"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022515"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span id="local-6989586621681022947"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681022512"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022947"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-200"></span><span>      </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#InstrSR"><span class="hs-identifier hs-type">InstrSR</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022947"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span>        </span><span id="local-6989586621681022506"><span class="annot"><span class="annottext">ppr :: InstrSR instr -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022504"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022504"><span class="hs-identifier hs-var">realInstr</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-203"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022504"><span class="hs-identifier hs-var">realInstr</span></a></span><span>
</span><span id="line-204"></span><span>
</span><span id="line-205"></span><span>        </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-type">SPILL</span></a></span><span> </span><span id="local-6989586621681022503"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022503"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681022502"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022502"><span class="hs-identifier hs-var">slot</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-207"></span><span>                </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;\tSPILL&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-208"></span><span>                </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span class="hs-special">,</span><span>
</span><span id="line-209"></span><span>                </span><span class="annot"><span class="annottext">Reg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022503"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-210"></span><span>                </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-211"></span><span>                </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;SLOT&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022502"><span class="hs-identifier hs-var">slot</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span>        </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-type">RELOAD</span></a></span><span> </span><span id="local-6989586621681022494"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022494"><span class="hs-identifier hs-var">slot</span></a></span></span><span> </span><span id="local-6989586621681022493"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022493"><span class="hs-identifier hs-var">reg</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="hs-special">[</span><span>
</span><span id="line-215"></span><span>                </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;\tRELOAD&quot;</span></span><span class="hs-special">,</span><span>
</span><span id="line-216"></span><span>                </span><span class="annot"><span class="annottext">Char -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">' '</span></span><span class="hs-special">,</span><span>
</span><span id="line-217"></span><span>                </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;SLOT&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#parens"><span class="hs-identifier hs-var">parens</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#int"><span class="hs-identifier hs-var">int</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022494"><span class="hs-identifier hs-var">slot</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-218"></span><span>                </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#comma"><span class="hs-identifier hs-var">comma</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-219"></span><span>                </span><span class="annot"><span class="annottext">Reg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022493"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-220"></span><span>
</span><span id="line-221"></span><span id="local-6989586621681022946"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681022490"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022946"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-222"></span><span>      </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022946"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-223"></span><span>
</span><span id="line-224"></span><span>        </span><span id="local-6989586621681022486"><span class="annot"><span class="annottext">ppr :: LiveInstr instr -&gt; SDoc
</span><a href="#local-6989586621681022486"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022485"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022485"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-225"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022485"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-226"></span><span>
</span><span id="line-227"></span><span>        </span><span class="annot"><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022484"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022484"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022483"><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022483"><span class="hs-identifier hs-var">live</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-228"></span><span>         </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">InstrSR instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022484"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-229"></span><span>                </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>
</span><span id="line-230"></span><span>                        </span><span class="annot"><span class="annottext">(SDoc -&gt; SDoc) -&gt; SDoc -&gt; SDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-231"></span><span>                        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; RegSet -&gt; SDoc
</span><a href="#local-6989586621681022479"><span class="hs-identifier hs-var">pprRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;# born:    &quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var hs-var">liveBorn</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022483"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; RegSet -&gt; SDoc
</span><a href="#local-6989586621681022479"><span class="hs-identifier hs-var">pprRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;# r_dying: &quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022483"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-233"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; RegSet -&gt; SDoc
</span><a href="#local-6989586621681022479"><span class="hs-identifier hs-var">pprRegs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;# w_dying: &quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022483"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-234"></span><span>                    </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#space"><span class="hs-identifier hs-var">space</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span>         </span><span class="hs-keyword">where</span><span>  </span><span class="annot"><a href="#local-6989586621681022479"><span class="hs-identifier hs-type">pprRegs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#SDoc"><span class="hs-identifier hs-type">SDoc</span></a></span><span>
</span><span id="line-237"></span><span>                </span><span id="local-6989586621681022479"><span class="annot"><span class="annottext">pprRegs :: SDoc -&gt; RegSet -&gt; SDoc
</span><a href="#local-6989586621681022479"><span class="hs-identifier hs-var hs-var">pprRegs</span></a></span></span><span> </span><span id="local-6989586621681022476"><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681022476"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621681022475"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022475"><span class="hs-identifier hs-var">regs</span></a></span></span><span>
</span><span id="line-238"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; Bool
forall a. UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#isEmptyUniqSet"><span class="hs-identifier hs-var">isEmptyUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022475"><span class="hs-identifier hs-var">regs</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-239"></span><span>                 </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="#local-6989586621681022476"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span>
</span><span id="line-240"></span><span>                     </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqFM Reg Reg -&gt; ([Reg] -&gt; SDoc) -&gt; SDoc
forall key a. UniqFM key a -&gt; ([a] -&gt; SDoc) -&gt; SDoc
</span><a href="GHC.Types.Unique.FM.html#pprUFM"><span class="hs-identifier hs-var">pprUFM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet -&gt; UniqFM Reg Reg
forall a. UniqSet a -&gt; UniqFM a a
</span><a href="GHC.Types.Unique.Set.html#getUniqSet"><span class="hs-identifier hs-var">getUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022475"><span class="hs-identifier hs-var">regs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#hcat"><span class="hs-identifier hs-var">hcat</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; SDoc) -&gt; ([Reg] -&gt; [SDoc]) -&gt; [Reg] -&gt; SDoc
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; [SDoc] -&gt; [SDoc]
</span><a href="GHC.Utils.Outputable.html#punctuate"><span class="hs-identifier hs-var">punctuate</span></a></span><span> </span><span class="annot"><span class="annottext">SDoc
</span><a href="GHC.Utils.Outputable.html#space"><span class="hs-identifier hs-var">space</span></a></span><span> </span><span class="annot"><span class="annottext">([SDoc] -&gt; [SDoc]) -&gt; ([Reg] -&gt; [SDoc]) -&gt; [Reg] -&gt; [SDoc]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; SDoc) -&gt; [Reg] -&gt; [SDoc]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span><span>
</span><span id="line-241"></span><span>
</span><span id="line-242"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621681022466"><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-243"></span><span>    </span><span id="local-6989586621681022449"><span class="annot"><span class="annottext">ppr :: LiveInfo -&gt; SDoc
</span><a href="#local-6989586621681022449"><span class="hs-identifier hs-var hs-var hs-var hs-var">ppr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span> </span><span id="local-6989586621681022448"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022448"><span class="hs-identifier hs-var">mb_static</span></a></span></span><span> </span><span id="local-6989586621681022447"><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022447"><span class="hs-identifier hs-var">entryIds</span></a></span></span><span> </span><span id="local-6989586621681022446"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022446"><span class="hs-identifier hs-var">liveVRegsOnEntry</span></a></span></span><span> </span><span id="local-6989586621681022445"><span class="annot"><span class="annottext">BlockMap IntSet
</span><a href="#local-6989586621681022445"><span class="hs-identifier hs-var">liveSlotsOnEntry</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-244"></span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap RawCmmStatics -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022448"><span class="hs-identifier hs-var">mb_static</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-245"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;# entryIds         = &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022447"><span class="hs-identifier hs-var">entryIds</span></a></span><span>
</span><span id="line-246"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;# liveVRegsOnEntry = &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022446"><span class="hs-identifier hs-var">liveVRegsOnEntry</span></a></span><span>
</span><span id="line-247"></span><span>        </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;# liveSlotsOnEntry = &quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockMap IntSet -&gt; [Char]
forall a. Show a =&gt; a -&gt; [Char]
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
</span><a href="#local-6989586621681022445"><span class="hs-identifier hs-var">liveSlotsOnEntry</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="hs-comment">-- | map a function across all the basic blocks in this code</span><span>
</span><span id="line-252"></span><span class="hs-comment">--</span><span>
</span><span id="line-253"></span><span id="local-6989586621681022922"><span id="local-6989586621681022924"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTop"><span class="hs-identifier hs-type">mapBlockTop</span></a></span><span>
</span><span id="line-254"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022924"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022924"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022922"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022924"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022922"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022924"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-256"></span><span>
</span><span id="line-257"></span><span id="mapBlockTop"><span class="annot"><span class="annottext">mapBlockTop :: forall instr statics.
(LiveBasicBlock instr -&gt; LiveBasicBlock instr)
-&gt; LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTop"><span class="hs-identifier hs-var hs-var">mapBlockTop</span></a></span></span><span> </span><span id="local-6989586621681022440"><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; LiveBasicBlock instr
</span><a href="#local-6989586621681022440"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621681022439"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022439"><span class="hs-identifier hs-var">cmm</span></a></span></span><span>
</span><span id="line-258"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State () (LiveCmmDecl statics instr)
-&gt; () -&gt; LiveCmmDecl statics instr
forall s a. State s a -&gt; s -&gt; a
</span><a href="GHC.Utils.Monad.State.html#evalState"><span class="hs-identifier hs-var">evalState</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LiveBasicBlock instr -&gt; State () (LiveBasicBlock instr))
-&gt; LiveCmmDecl statics instr
-&gt; State () (LiveCmmDecl statics instr)
forall (m :: * -&gt; *) instr statics.
Monad m =&gt;
(LiveBasicBlock instr -&gt; m (LiveBasicBlock instr))
-&gt; LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTopM"><span class="hs-identifier hs-var">mapBlockTopM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681022437"><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681022437"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; State () (LiveBasicBlock instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(LiveBasicBlock instr -&gt; State () (LiveBasicBlock instr))
-&gt; LiveBasicBlock instr -&gt; State () (LiveBasicBlock instr)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; LiveBasicBlock instr
</span><a href="#local-6989586621681022440"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681022437"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022439"><span class="hs-identifier hs-var">cmm</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-259"></span><span>
</span><span id="line-260"></span><span>
</span><span id="line-261"></span><span class="hs-comment">-- | map a function across all the basic blocks in this code (monadic version)</span><span>
</span><span id="line-262"></span><span class="hs-comment">--</span><span>
</span><span id="line-263"></span><span id="local-6989586621681022912"><span id="local-6989586621681022913"><span id="local-6989586621681022914"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTopM"><span class="hs-identifier hs-type">mapBlockTopM</span></a></span><span>
</span><span id="line-264"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022914"><span class="hs-identifier hs-type">m</span></a></span><span>
</span><span id="line-265"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022913"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022914"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022913"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-266"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022912"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022913"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022914"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022912"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022913"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span><span id="mapBlockTopM"><span class="annot"><span class="annottext">mapBlockTopM :: forall (m :: * -&gt; *) instr statics.
Monad m =&gt;
(LiveBasicBlock instr -&gt; m (LiveBasicBlock instr))
-&gt; LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTopM"><span class="hs-identifier hs-var hs-var">mapBlockTopM</span></a></span></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; m (LiveBasicBlock instr)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681022428"><span class="annot"><span class="annottext">cmm :: LiveCmmDecl statics instr
</span><a href="#local-6989586621681022428"><span class="hs-identifier hs-var">cmm</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022428"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTopM"><span class="hs-identifier hs-var">mapBlockTopM</span></a></span><span> </span><span id="local-6989586621681022426"><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; m (LiveBasicBlock instr)
</span><a href="#local-6989586621681022426"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681022424"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022424"><span class="hs-identifier hs-var">header</span></a></span></span><span> </span><span id="local-6989586621681022423"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022423"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span id="local-6989586621681022422"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022422"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span id="local-6989586621681022421"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022421"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022420"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022420"><span class="hs-identifier hs-var">sccs'</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(SCC (LiveBasicBlock instr) -&gt; m (SCC (LiveBasicBlock instr)))
-&gt; [SCC (LiveBasicBlock instr)] -&gt; m [SCC (LiveBasicBlock instr)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LiveBasicBlock instr -&gt; m (LiveBasicBlock instr))
-&gt; SCC (LiveBasicBlock instr) -&gt; m (SCC (LiveBasicBlock instr))
forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; SCC a -&gt; m (SCC b)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapSCCM"><span class="hs-identifier hs-var">mapSCCM</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; m (LiveBasicBlock instr)
</span><a href="#local-6989586621681022426"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022421"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-273"></span><span>        </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="annot"><span class="annottext">(LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr))
-&gt; LiveCmmDecl statics instr -&gt; m (LiveCmmDecl statics instr)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; LiveCmmDecl statics instr
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022424"><span class="hs-identifier hs-var">header</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022423"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022422"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022420"><span class="hs-identifier hs-var">sccs'</span></a></span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span id="local-6989586621681022897"><span id="local-6989586621681022898"><span id="local-6989586621681022899"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapSCCM"><span class="hs-identifier hs-type">mapSCCM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022899"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681022898"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022899"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022897"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022898"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022899"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022897"><span class="hs-identifier hs-type">b</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-276"></span><span id="mapSCCM"><span class="annot"><span class="annottext">mapSCCM :: forall (m :: * -&gt; *) a b.
Monad m =&gt;
(a -&gt; m b) -&gt; SCC a -&gt; m (SCC b)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapSCCM"><span class="hs-identifier hs-var hs-var">mapSCCM</span></a></span></span><span> </span><span id="local-6989586621681022411"><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621681022411"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-type">AcyclicSCC</span></a></span><span> </span><span id="local-6989586621681022409"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681022409"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022408"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681022408"><span class="hs-identifier hs-var">x'</span></a></span></span><span>      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621681022411"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681022409"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-278"></span><span>        </span><span class="annot"><span class="annottext">SCC b -&gt; m (SCC b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="annot"><span class="annottext">(SCC b -&gt; m (SCC b)) -&gt; SCC b -&gt; m (SCC b)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">b -&gt; SCC b
forall vertex. vertex -&gt; SCC vertex
</span><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-var">AcyclicSCC</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681022408"><span class="hs-identifier hs-var">x'</span></a></span><span>
</span><span id="line-279"></span><span>
</span><span id="line-280"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapSCCM"><span class="hs-identifier hs-var">mapSCCM</span></a></span><span> </span><span id="local-6989586621681022407"><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621681022407"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-type">CyclicSCC</span></a></span><span> </span><span id="local-6989586621681022405"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681022405"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-281"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022404"><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621681022404"><span class="hs-identifier hs-var">xs'</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(a -&gt; m b) -&gt; [a] -&gt; m [b]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m b
</span><a href="#local-6989586621681022407"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681022405"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-282"></span><span>        </span><span class="annot"><span class="annottext">SCC b -&gt; m (SCC b)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="annot"><span class="annottext">(SCC b -&gt; m (SCC b)) -&gt; SCC b -&gt; m (SCC b)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[b] -&gt; SCC b
forall vertex. [vertex] -&gt; SCC vertex
</span><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-var">CyclicSCC</span></a></span><span> </span><span class="annot"><span class="annottext">[b]
</span><a href="#local-6989586621681022404"><span class="hs-identifier hs-var">xs'</span></a></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span>
</span><span id="line-285"></span><span class="hs-comment">-- map a function across all the basic blocks in this code</span><span>
</span><span id="line-286"></span><span id="local-6989586621681022885"><span id="local-6989586621681022886"><span id="local-6989586621681022888"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTop"><span class="hs-identifier hs-type">mapGenBlockTop</span></a></span><span>
</span><span id="line-287"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span>             </span><span class="annot"><a href="#local-6989586621681022888"><span class="hs-identifier hs-type">i</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span>            </span><span class="annot"><a href="#local-6989586621681022888"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-288"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022886"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022885"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022888"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022886"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022885"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022888"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span id="mapGenBlockTop"><span class="annot"><span class="annottext">mapGenBlockTop :: forall i d h.
(GenBasicBlock i -&gt; GenBasicBlock i)
-&gt; GenCmmDecl d h (ListGraph i) -&gt; GenCmmDecl d h (ListGraph i)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTop"><span class="hs-identifier hs-var hs-var">mapGenBlockTop</span></a></span></span><span> </span><span id="local-6989586621681022401"><span class="annot"><span class="annottext">GenBasicBlock i -&gt; GenBasicBlock i
</span><a href="#local-6989586621681022401"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621681022400"><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i)
</span><a href="#local-6989586621681022400"><span class="hs-identifier hs-var">cmm</span></a></span></span><span>
</span><span id="line-291"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State () (GenCmmDecl d h (ListGraph i))
-&gt; () -&gt; GenCmmDecl d h (ListGraph i)
forall s a. State s a -&gt; s -&gt; a
</span><a href="GHC.Utils.Monad.State.html#evalState"><span class="hs-identifier hs-var">evalState</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(GenBasicBlock i -&gt; State () (GenBasicBlock i))
-&gt; GenCmmDecl d h (ListGraph i)
-&gt; State () (GenCmmDecl d h (ListGraph i))
forall (m :: * -&gt; *) i d h.
Monad m =&gt;
(GenBasicBlock i -&gt; m (GenBasicBlock i))
-&gt; GenCmmDecl d h (ListGraph i) -&gt; m (GenCmmDecl d h (ListGraph i))
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTopM"><span class="hs-identifier hs-var">mapGenBlockTopM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681022399"><span class="annot"><span class="annottext">GenBasicBlock i
</span><a href="#local-6989586621681022399"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; State () (GenBasicBlock i)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock i -&gt; State () (GenBasicBlock i))
-&gt; GenBasicBlock i -&gt; State () (GenBasicBlock i)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; GenBasicBlock i
</span><a href="#local-6989586621681022401"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i
</span><a href="#local-6989586621681022399"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i)
</span><a href="#local-6989586621681022400"><span class="hs-identifier hs-var">cmm</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span>
</span><span id="line-294"></span><span class="hs-comment">-- | map a function across all the basic blocks in this code (monadic version)</span><span>
</span><span id="line-295"></span><span id="local-6989586621681022877"><span id="local-6989586621681022878"><span id="local-6989586621681022879"><span id="local-6989586621681022880"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTopM"><span class="hs-identifier hs-type">mapGenBlockTopM</span></a></span><span>
</span><span id="line-296"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022880"><span class="hs-identifier hs-type">m</span></a></span><span>
</span><span id="line-297"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span>            </span><span class="annot"><a href="#local-6989586621681022879"><span class="hs-identifier hs-type">i</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022880"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenBasicBlock"><span class="hs-identifier hs-type">GenBasicBlock</span></a></span><span>            </span><span class="annot"><a href="#local-6989586621681022879"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022878"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022877"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022879"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022880"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022878"><span class="hs-identifier hs-type">d</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022877"><span class="hs-identifier hs-type">h</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022879"><span class="hs-identifier hs-type">i</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span></span></span></span></span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span id="mapGenBlockTopM"><span class="annot"><span class="annottext">mapGenBlockTopM :: forall (m :: * -&gt; *) i d h.
Monad m =&gt;
(GenBasicBlock i -&gt; m (GenBasicBlock i))
-&gt; GenCmmDecl d h (ListGraph i) -&gt; m (GenCmmDecl d h (ListGraph i))
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTopM"><span class="hs-identifier hs-var hs-var">mapGenBlockTopM</span></a></span></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; m (GenBasicBlock i)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681022392"><span class="annot"><span class="annottext">cmm :: GenCmmDecl d h (ListGraph i)
</span><a href="#local-6989586621681022392"><span class="hs-identifier hs-var">cmm</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-301"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i) -&gt; m (GenCmmDecl d h (ListGraph i))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i)
</span><a href="#local-6989586621681022392"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#mapGenBlockTopM"><span class="hs-identifier hs-var">mapGenBlockTopM</span></a></span><span> </span><span id="local-6989586621681022391"><span class="annot"><span class="annottext">GenBasicBlock i -&gt; m (GenBasicBlock i)
</span><a href="#local-6989586621681022391"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681022390"><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621681022390"><span class="hs-identifier hs-var">header</span></a></span></span><span> </span><span id="local-6989586621681022389"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022389"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span id="local-6989586621681022388"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022388"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681022386"><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681022386"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022385"><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681022385"><span class="hs-identifier hs-var">blocks'</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock i -&gt; m (GenBasicBlock i))
-&gt; [GenBasicBlock i] -&gt; m [GenBasicBlock i]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock i -&gt; m (GenBasicBlock i)
</span><a href="#local-6989586621681022391"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681022386"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-305"></span><span>        </span><span class="annot"><span class="annottext">GenCmmDecl d h (ListGraph i) -&gt; m (GenCmmDecl d h (ListGraph i))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="annot"><span class="annottext">(GenCmmDecl d h (ListGraph i) -&gt; m (GenCmmDecl d h (ListGraph i)))
-&gt; GenCmmDecl d h (ListGraph i) -&gt; m (GenCmmDecl d h (ListGraph i))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">h
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; ListGraph i
-&gt; GenCmmDecl d h (ListGraph i)
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">h
</span><a href="#local-6989586621681022390"><span class="hs-identifier hs-var">header</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022389"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022388"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenBasicBlock i] -&gt; ListGraph i
forall i. [GenBasicBlock i] -&gt; ListGraph i
</span><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock i]
</span><a href="#local-6989586621681022385"><span class="hs-identifier hs-var">blocks'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-306"></span><span>
</span><span id="line-307"></span><span>
</span><span id="line-308"></span><span class="hs-comment">-- | Slurp out the list of register conflicts and reg-reg moves from this top level thing.</span><span>
</span><span id="line-309"></span><span class="hs-comment">--   Slurping of conflicts and moves is wrapped up together so we don't have</span><span>
</span><span id="line-310"></span><span class="hs-comment">--   to make two passes over the same code when we want to build the graph.</span><span>
</span><span id="line-311"></span><span class="hs-comment">--</span><span>
</span><span id="line-312"></span><span id="local-6989586621681022870"><span id="local-6989586621681022871"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#slurpConflicts"><span class="hs-identifier hs-type">slurpConflicts</span></a></span><span>
</span><span id="line-313"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022871"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-314"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022870"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022871"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-315"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.Set.html#UniqSet"><span class="hs-identifier hs-type">UniqSet</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-316"></span><span>
</span><span id="line-317"></span><span id="slurpConflicts"><span class="annot"><span class="annottext">slurpConflicts :: forall instr statics.
Instruction instr =&gt;
LiveCmmDecl statics instr -&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#slurpConflicts"><span class="hs-identifier hs-var hs-var">slurpConflicts</span></a></span></span><span> </span><span id="local-6989586621681022380"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022380"><span class="hs-identifier hs-var">live</span></a></span></span><span>
</span><span id="line-318"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
-&gt; LiveCmmDecl statics instr -&gt; (Bag RegSet, Bag (Reg, Reg))
forall {t :: * -&gt; *} {instr} {d}.
(Foldable t, Instruction instr) =&gt;
(Bag RegSet, Bag (Reg, Reg))
-&gt; GenCmmDecl
     d LiveInfo (t (SCC (GenBasicBlock (LiveInstr instr))))
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022379"><span class="hs-identifier hs-var">slurpCmm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bag RegSet
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022380"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-319"></span><span>
</span><span id="line-320"></span><span> </span><span class="hs-keyword">where</span><span>  </span><span id="local-6989586621681022379"><span class="annot"><span class="annottext">slurpCmm :: (Bag RegSet, Bag (Reg, Reg))
-&gt; GenCmmDecl
     d LiveInfo (t (SCC (GenBasicBlock (LiveInstr instr))))
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022379"><span class="hs-identifier hs-var hs-var">slurpCmm</span></a></span></span><span>   </span><span id="local-6989586621681022373"><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022373"><span class="hs-identifier hs-var">rs</span></a></span></span><span>  </span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022373"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-321"></span><span>        </span><span class="annot"><a href="#local-6989586621681022379"><span class="hs-identifier hs-var">slurpCmm</span></a></span><span>   </span><span id="local-6989586621681022372"><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022372"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681022371"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022371"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681022370"><span class="annot"><span class="annottext">t (SCC (GenBasicBlock (LiveInstr instr)))
</span><a href="#local-6989586621681022370"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-322"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Bag RegSet, Bag (Reg, Reg))
 -&gt; SCC (GenBasicBlock (LiveInstr instr))
 -&gt; (Bag RegSet, Bag (Reg, Reg)))
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; t (SCC (GenBasicBlock (LiveInstr instr)))
-&gt; (Bag RegSet, Bag (Reg, Reg))
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; SCC (GenBasicBlock (LiveInstr instr))
-&gt; (Bag RegSet, Bag (Reg, Reg))
forall {instr}.
Instruction instr =&gt;
LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; SCC (GenBasicBlock (LiveInstr instr))
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022368"><span class="hs-identifier hs-var">slurpSCC</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022371"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022372"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="annot"><span class="annottext">t (SCC (GenBasicBlock (LiveInstr instr)))
</span><a href="#local-6989586621681022370"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-323"></span><span>
</span><span id="line-324"></span><span>        </span><span id="local-6989586621681022368"><span class="annot"><span class="annottext">slurpSCC :: LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; SCC (GenBasicBlock (LiveInstr instr))
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022368"><span class="hs-identifier hs-var hs-var">slurpSCC</span></a></span></span><span>  </span><span id="local-6989586621681022363"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022363"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681022362"><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022362"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-type">AcyclicSCC</span></a></span><span> </span><span id="local-6989586621681022361"><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022361"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-325"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; GenBasicBlock (LiveInstr instr)
-&gt; (Bag RegSet, Bag (Reg, Reg))
forall {instr}.
Instruction instr =&gt;
LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; GenBasicBlock (LiveInstr instr)
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022360"><span class="hs-identifier hs-var">slurpBlock</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022363"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022362"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022361"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-326"></span><span>
</span><span id="line-327"></span><span>        </span><span class="annot"><a href="#local-6989586621681022368"><span class="hs-identifier hs-var">slurpSCC</span></a></span><span>  </span><span id="local-6989586621681022359"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022359"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681022358"><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022358"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-type">CyclicSCC</span></a></span><span> </span><span id="local-6989586621681022357"><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681022357"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-328"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((Bag RegSet, Bag (Reg, Reg))
 -&gt; GenBasicBlock (LiveInstr instr) -&gt; (Bag RegSet, Bag (Reg, Reg)))
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [GenBasicBlock (LiveInstr instr)]
-&gt; (Bag RegSet, Bag (Reg, Reg))
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; GenBasicBlock (LiveInstr instr)
-&gt; (Bag RegSet, Bag (Reg, Reg))
forall {instr}.
Instruction instr =&gt;
LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; GenBasicBlock (LiveInstr instr)
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022360"><span class="hs-identifier hs-var">slurpBlock</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022359"><span class="hs-identifier hs-var">info</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022358"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681022357"><span class="hs-identifier hs-var">bs</span></a></span><span>
</span><span id="line-329"></span><span>
</span><span id="line-330"></span><span>        </span><span id="local-6989586621681022360"><span class="annot"><span class="annottext">slurpBlock :: LiveInfo
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; GenBasicBlock (LiveInstr instr)
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022360"><span class="hs-identifier hs-var hs-var">slurpBlock</span></a></span></span><span> </span><span id="local-6989586621681022352"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022352"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681022351"><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022351"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022349"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022349"><span class="hs-identifier hs-var">blockId</span></a></span></span><span> </span><span id="local-6989586621681022348"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022348"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-331"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681022347"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022347"><span class="hs-identifier hs-var">blockLive</span></a></span></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022352"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-332"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022346"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022346"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span></span><span>                </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; BlockMap RegSet -&gt; Maybe RegSet
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681022349"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022347"><span class="hs-identifier hs-var">blockLive</span></a></span><span>
</span><span id="line-333"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022344"><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022344"><span class="hs-identifier hs-var">conflicts</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022343"><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022343"><span class="hs-identifier hs-var">moves</span></a></span></span><span class="hs-special">)</span><span>              </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">RegSet
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [LiveInstr instr]
-&gt; (Bag RegSet, Bag (Reg, Reg))
forall {instr}.
Instruction instr =&gt;
RegSet
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [LiveInstr instr]
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022342"><span class="hs-identifier hs-var">slurpLIs</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022346"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022351"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022348"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-334"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet -&gt; Bag RegSet -&gt; Bag RegSet
forall a. a -&gt; Bag a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#consBag"><span class="hs-identifier hs-var">consBag</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022346"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span><span> </span><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022344"><span class="hs-identifier hs-var">conflicts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022343"><span class="hs-identifier hs-var">moves</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-335"></span><span>
</span><span id="line-336"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-337"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; (Bag RegSet, Bag (Reg, Reg))
forall a. [Char] -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;Liveness.slurpConflicts: bad block&quot;</span></span><span>
</span><span id="line-338"></span><span>
</span><span id="line-339"></span><span>        </span><span id="local-6989586621681022342"><span class="annot"><span class="annottext">slurpLIs :: RegSet
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [LiveInstr instr]
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022342"><span class="hs-identifier hs-var hs-var">slurpLIs</span></a></span></span><span> </span><span id="local-6989586621681022336"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022336"><span class="hs-identifier hs-var">rsLive</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022335"><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022335"><span class="hs-identifier hs-var">conflicts</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022334"><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022334"><span class="hs-identifier hs-var">moves</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-340"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet -&gt; Bag RegSet -&gt; Bag RegSet
forall a. a -&gt; Bag a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#consBag"><span class="hs-identifier hs-var">consBag</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022336"><span class="hs-identifier hs-var">rsLive</span></a></span><span> </span><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022335"><span class="hs-identifier hs-var">conflicts</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022334"><span class="hs-identifier hs-var">moves</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-341"></span><span>
</span><span id="line-342"></span><span>        </span><span class="annot"><a href="#local-6989586621681022342"><span class="hs-identifier hs-var">slurpLIs</span></a></span><span> </span><span id="local-6989586621681022333"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022333"><span class="hs-identifier hs-var">rsLive</span></a></span></span><span> </span><span id="local-6989586621681022332"><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022332"><span class="hs-identifier hs-var">rs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>     </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022331"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022331"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [LiveInstr instr]
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022342"><span class="hs-identifier hs-var">slurpLIs</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022333"><span class="hs-identifier hs-var">rsLive</span></a></span><span> </span><span class="annot"><span class="annottext">(Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022332"><span class="hs-identifier hs-var">rs</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022331"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span>        </span><span class="annot"><a href="#local-6989586621681022342"><span class="hs-identifier hs-var">slurpLIs</span></a></span><span> </span><span id="local-6989586621681022330"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022330"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022329"><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022329"><span class="hs-identifier hs-var">conflicts</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022328"><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022328"><span class="hs-identifier hs-var">moves</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022327"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022327"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022326"><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022325"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022325"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-346"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-347"></span><span>                </span><span class="hs-comment">-- regs that die because they are read for the last time at the start of an instruction</span><span>
</span><span id="line-348"></span><span>                </span><span class="hs-comment">--      are not live across it.</span><span>
</span><span id="line-349"></span><span>                </span><span id="local-6989586621681022324"><span class="annot"><span class="annottext">rsLiveAcross :: RegSet
</span><a href="#local-6989586621681022324"><span class="hs-identifier hs-var hs-var">rsLiveAcross</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022330"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-350"></span><span>
</span><span id="line-351"></span><span>                </span><span class="hs-comment">-- regs live on entry to the next instruction.</span><span>
</span><span id="line-352"></span><span>                </span><span class="hs-comment">--      be careful of orphans, make sure to delete dying regs _after_ unioning</span><span>
</span><span id="line-353"></span><span>                </span><span class="hs-comment">--      in the ones that are born here.</span><span>
</span><span id="line-354"></span><span>                </span><span id="local-6989586621681022322"><span class="annot"><span class="annottext">rsLiveNext :: RegSet
</span><a href="#local-6989586621681022322"><span class="hs-identifier hs-var hs-var">rsLiveNext</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022324"><span class="hs-identifier hs-var">rsLiveAcross</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-operator hs-var">`unionUniqSets`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var hs-var">liveBorn</span></a></span><span>     </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-355"></span><span>                                                </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-356"></span><span>
</span><span id="line-357"></span><span>                </span><span class="hs-comment">-- orphan vregs are the ones that die in the same instruction they are born in.</span><span>
</span><span id="line-358"></span><span>                </span><span class="hs-comment">--      these are likely to be results that are never used, but we still</span><span>
</span><span id="line-359"></span><span>                </span><span class="hs-comment">--      need to assign a hreg to them..</span><span>
</span><span id="line-360"></span><span>                </span><span id="local-6989586621681022320"><span class="annot"><span class="annottext">rsOrphans :: RegSet
</span><a href="#local-6989586621681022320"><span class="hs-identifier hs-var hs-var">rsOrphans</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#intersectUniqSets"><span class="hs-identifier hs-var">intersectUniqSets</span></a></span><span>
</span><span id="line-361"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var hs-var">liveBorn</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span>                                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-identifier hs-var">unionUniqSets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022326"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-363"></span><span>
</span><span id="line-364"></span><span>                </span><span class="hs-comment">--</span><span>
</span><span id="line-365"></span><span>                </span><span id="local-6989586621681022318"><span class="annot"><span class="annottext">rsConflicts :: RegSet
</span><a href="#local-6989586621681022318"><span class="hs-identifier hs-var hs-var">rsConflicts</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-identifier hs-var">unionUniqSets</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022322"><span class="hs-identifier hs-var">rsLiveNext</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022320"><span class="hs-identifier hs-var">rsOrphans</span></a></span><span>
</span><span id="line-366"></span><span>
</span><span id="line-367"></span><span>          </span><span class="hs-keyword">in</span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe (Reg, Reg)
forall instr. Instruction instr =&gt; instr -&gt; Maybe (Reg, Reg)
</span><a href="GHC.CmmToAsm.Instr.html#takeRegRegMoveInstr"><span class="hs-identifier hs-var">takeRegRegMoveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022327"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-368"></span><span>                 </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022317"><span class="annot"><span class="annottext">(Reg, Reg)
</span><a href="#local-6989586621681022317"><span class="hs-identifier hs-var">rr</span></a></span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegSet
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [LiveInstr instr]
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022342"><span class="hs-identifier hs-var">slurpLIs</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022322"><span class="hs-identifier hs-var">rsLiveNext</span></a></span><span>
</span><span id="line-369"></span><span>                                        </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; Bag RegSet -&gt; Bag RegSet
forall a. a -&gt; Bag a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#consBag"><span class="hs-identifier hs-var">consBag</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022318"><span class="hs-identifier hs-var">rsConflicts</span></a></span><span> </span><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022329"><span class="hs-identifier hs-var">conflicts</span></a></span><span>
</span><span id="line-370"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Reg, Reg) -&gt; Bag (Reg, Reg) -&gt; Bag (Reg, Reg)
forall a. a -&gt; Bag a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#consBag"><span class="hs-identifier hs-var">consBag</span></a></span><span> </span><span class="annot"><span class="annottext">(Reg, Reg)
</span><a href="#local-6989586621681022317"><span class="hs-identifier hs-var">rr</span></a></span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022328"><span class="hs-identifier hs-var">moves</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022325"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span>                 </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegSet
-&gt; (Bag RegSet, Bag (Reg, Reg))
-&gt; [LiveInstr instr]
-&gt; (Bag RegSet, Bag (Reg, Reg))
</span><a href="#local-6989586621681022342"><span class="hs-identifier hs-var">slurpLIs</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022322"><span class="hs-identifier hs-var">rsLiveNext</span></a></span><span>
</span><span id="line-373"></span><span>                                        </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; Bag RegSet -&gt; Bag RegSet
forall a. a -&gt; Bag a -&gt; Bag a
</span><a href="GHC.Data.Bag.html#consBag"><span class="hs-identifier hs-var">consBag</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681022318"><span class="hs-identifier hs-var">rsConflicts</span></a></span><span> </span><span class="annot"><span class="annottext">Bag RegSet
</span><a href="#local-6989586621681022329"><span class="hs-identifier hs-var">conflicts</span></a></span><span>
</span><span id="line-374"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022328"><span class="hs-identifier hs-var">moves</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022325"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-375"></span><span>
</span><span id="line-376"></span><span>
</span><span id="line-377"></span><span class="hs-comment">-- | For spill\/reloads</span><span>
</span><span id="line-378"></span><span class="hs-comment">--</span><span>
</span><span id="line-379"></span><span class="hs-comment">--   SPILL  v1, slot1</span><span>
</span><span id="line-380"></span><span class="hs-comment">--   ...</span><span>
</span><span id="line-381"></span><span class="hs-comment">--   RELOAD slot1, v2</span><span>
</span><span id="line-382"></span><span class="hs-comment">--</span><span>
</span><span id="line-383"></span><span class="hs-comment">--   If we can arrange that v1 and v2 are allocated to the same hreg it's more likely</span><span>
</span><span id="line-384"></span><span class="hs-comment">--   the spill\/reload instrs can be cleaned and replaced by a nop reg-reg move.</span><span>
</span><span id="line-385"></span><span class="hs-comment">--</span><span>
</span><span id="line-386"></span><span class="hs-comment">--</span><span>
</span><span id="line-387"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#slurpReloadCoalesce"><span class="hs-identifier hs-type">slurpReloadCoalesce</span></a></span><span>
</span><span id="line-388"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681022848"><span class="annot"><a href="#local-6989586621681022848"><span class="hs-identifier hs-type">statics</span></a></span></span><span> </span><span id="local-6989586621681022849"><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span></span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-389"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022848"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-390"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-391"></span><span>
</span><span id="line-392"></span><span id="slurpReloadCoalesce"><span class="annot"><span class="annottext">slurpReloadCoalesce :: forall statics instr.
Instruction instr =&gt;
LiveCmmDecl statics instr -&gt; Bag (Reg, Reg)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#slurpReloadCoalesce"><span class="hs-identifier hs-var hs-var">slurpReloadCoalesce</span></a></span></span><span> </span><span id="local-6989586621681022285"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022285"><span class="hs-identifier hs-var">live</span></a></span></span><span>
</span><span id="line-393"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg) -&gt; LiveCmmDecl statics instr -&gt; Bag (Reg, Reg)
forall t t1.
Bag (Reg, Reg)
-&gt; GenCmmDecl t t1 [SCC (LiveBasicBlock instr)] -&gt; Bag (Reg, Reg)
</span><a href="#local-6989586621681022284"><span class="hs-identifier hs-var">slurpCmm</span></a></span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
forall a. Bag a
</span><a href="GHC.Data.Bag.html#emptyBag"><span class="hs-identifier hs-var">emptyBag</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022285"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-396"></span><span>        </span><span id="local-6989586621681022842"><span id="local-6989586621681022843"><span class="annot"><a href="#local-6989586621681022284"><span class="hs-identifier hs-type">slurpCmm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-397"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Cmm.html#GenCmmDecl"><span class="hs-identifier hs-type">GenCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022843"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022842"><span class="hs-identifier hs-type">t1</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-398"></span><span>                 </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-399"></span><span>        </span><span id="local-6989586621681022284"><span class="annot"><span class="annottext">slurpCmm :: forall t t1.
Bag (Reg, Reg)
-&gt; GenCmmDecl t t1 [SCC (LiveBasicBlock instr)] -&gt; Bag (Reg, Reg)
</span><a href="#local-6989586621681022284"><span class="hs-identifier hs-var hs-var">slurpCmm</span></a></span></span><span> </span><span id="local-6989586621681022283"><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022283"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022283"><span class="hs-identifier hs-var">cs</span></a></span><span>
</span><span id="line-400"></span><span>        </span><span class="annot"><a href="#local-6989586621681022284"><span class="hs-identifier hs-var">slurpCmm</span></a></span><span> </span><span id="local-6989586621681022282"><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022282"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">t1
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681022281"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022281"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-401"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg) -&gt; [LiveBasicBlock instr] -&gt; Bag (Reg, Reg)
</span><a href="#local-6989586621681022280"><span class="hs-identifier hs-var">slurpComp</span></a></span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022282"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)] -&gt; [LiveBasicBlock instr]
forall a. [SCC a] -&gt; [a]
</span><a href="../../containers/src/Data.Graph.html#flattenSCCs"><span class="hs-identifier hs-var">flattenSCCs</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022281"><span class="hs-identifier hs-var">sccs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-402"></span><span>
</span><span id="line-403"></span><span>        </span><span class="annot"><a href="#local-6989586621681022280"><span class="hs-identifier hs-type">slurpComp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-404"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-405"></span><span>                     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-406"></span><span>        </span><span id="local-6989586621681022280"><span class="annot"><span class="annottext">slurpComp :: Bag (Reg, Reg) -&gt; [LiveBasicBlock instr] -&gt; Bag (Reg, Reg)
</span><a href="#local-6989586621681022280"><span class="hs-identifier hs-var hs-var">slurpComp</span></a></span></span><span>  </span><span id="local-6989586621681022278"><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022278"><span class="hs-identifier hs-var">cs</span></a></span></span><span> </span><span id="local-6989586621681022277"><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022277"><span class="hs-identifier hs-var">blocks</span></a></span></span><span>
</span><span id="line-407"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681022276"><span class="annot"><span class="annottext">[Bag (Reg, Reg)]
</span><a href="#local-6989586621681022276"><span class="hs-identifier hs-var">moveBags</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqFM BlockId [SlotMap Reg]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State (UniqFM BlockId [SlotMap Reg]) [Bag (Reg, Reg)]
-&gt; UniqFM BlockId [SlotMap Reg]
-&gt; ([Bag (Reg, Reg)], UniqFM BlockId [SlotMap Reg])
forall s a. State s a -&gt; s -&gt; (a, s)
</span><a href="GHC.Utils.Monad.State.html#runState"><span class="hs-identifier hs-var">runState</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
-&gt; State (UniqFM BlockId [SlotMap Reg]) [Bag (Reg, Reg)]
</span><a href="#local-6989586621681022274"><span class="hs-identifier hs-var">slurpCompM</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022277"><span class="hs-identifier hs-var">blocks</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">UniqFM BlockId [SlotMap Reg]
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-408"></span><span>           </span><span class="hs-keyword">in</span><span>   </span><span class="annot"><span class="annottext">[Bag (Reg, Reg)] -&gt; Bag (Reg, Reg)
forall a. [Bag a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#unionManyBags"><span class="hs-identifier hs-var">unionManyBags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bag (Reg, Reg)
</span><a href="#local-6989586621681022278"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="annot"><span class="annottext">Bag (Reg, Reg) -&gt; [Bag (Reg, Reg)] -&gt; [Bag (Reg, Reg)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Bag (Reg, Reg)]
</span><a href="#local-6989586621681022276"><span class="hs-identifier hs-var">moveBags</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-409"></span><span>
</span><span id="line-410"></span><span>        </span><span class="annot"><a href="#local-6989586621681022274"><span class="hs-identifier hs-type">slurpCompM</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-411"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Slot"><span class="hs-identifier hs-type">Slot</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-412"></span><span>        </span><span id="local-6989586621681022274"><span class="annot"><span class="annottext">slurpCompM :: [LiveBasicBlock instr]
-&gt; State (UniqFM BlockId [SlotMap Reg]) [Bag (Reg, Reg)]
</span><a href="#local-6989586621681022274"><span class="hs-identifier hs-var hs-var">slurpCompM</span></a></span></span><span> </span><span id="local-6989586621681022272"><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022272"><span class="hs-identifier hs-var">blocks</span></a></span></span><span>
</span><span id="line-413"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span class="hs-comment">-- run the analysis once to record the mapping across jumps.</span><span>
</span><span id="line-414"></span><span>                </span><span class="annot"><span class="annottext">(LiveBasicBlock instr
 -&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg)))
-&gt; [LiveBasicBlock instr]
-&gt; State (UniqFM BlockId [SlotMap Reg]) ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
-&gt; LiveBasicBlock instr
-&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg))
</span><a href="#local-6989586621681022270"><span class="hs-identifier hs-var">slurpBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022272"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-415"></span><span>
</span><span id="line-416"></span><span>                </span><span class="hs-comment">-- run it a second time while using the information from the last pass.</span><span>
</span><span id="line-417"></span><span>                </span><span class="hs-comment">--      We /could/ run this many more times to deal with graphical control</span><span>
</span><span id="line-418"></span><span>                </span><span class="hs-comment">--      flow and propagating info across multiple jumps, but it's probably</span><span>
</span><span id="line-419"></span><span>                </span><span class="hs-comment">--      not worth the trouble.</span><span>
</span><span id="line-420"></span><span>                </span><span class="annot"><span class="annottext">(LiveBasicBlock instr
 -&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg)))
-&gt; [LiveBasicBlock instr]
-&gt; State (UniqFM BlockId [SlotMap Reg]) [Bag (Reg, Reg)]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#mapM"><span class="hs-identifier hs-var">mapM</span></a></span><span>    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
-&gt; LiveBasicBlock instr
-&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg))
</span><a href="#local-6989586621681022270"><span class="hs-identifier hs-var">slurpBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022272"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-421"></span><span>
</span><span id="line-422"></span><span>        </span><span class="annot"><a href="#local-6989586621681022270"><span class="hs-identifier hs-type">slurpBlock</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-423"></span><span>                   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Slot"><span class="hs-identifier hs-type">Slot</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Data.Bag.html#Bag"><span class="hs-identifier hs-type">Bag</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-424"></span><span>        </span><span id="local-6989586621681022270"><span class="annot"><span class="annottext">slurpBlock :: Bool
-&gt; LiveBasicBlock instr
-&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg))
</span><a href="#local-6989586621681022270"><span class="hs-identifier hs-var hs-var">slurpBlock</span></a></span></span><span> </span><span id="local-6989586621681022269"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681022269"><span class="hs-identifier hs-var">propagate</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022268"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022268"><span class="hs-identifier hs-var">blockId</span></a></span></span><span> </span><span id="local-6989586621681022267"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022267"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-425"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span class="hs-comment">-- grab the slot map for entry to this block</span><span>
</span><span id="line-426"></span><span>                </span><span id="local-6989586621681022266"><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022266"><span class="hs-identifier hs-var">slotMap</span></a></span></span><span>         </span><span class="hs-glyph">&lt;-</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681022269"><span class="hs-identifier hs-var">propagate</span></a></span><span>
</span><span id="line-427"></span><span>                                        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; State (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg)
forall {key}.
Uniquable key =&gt;
key -&gt; State (UniqFM key [SlotMap Reg]) (SlotMap Reg)
</span><a href="#local-6989586621681022265"><span class="hs-identifier hs-var">getSlotMap</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022268"><span class="hs-identifier hs-var">blockId</span></a></span><span>
</span><span id="line-428"></span><span>                                        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; State (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022264"><span class="annot"><span class="annottext">[Maybe (Reg, Reg)]
</span><a href="#local-6989586621681022264"><span class="hs-identifier hs-var">mMoves</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg
 -&gt; LiveInstr instr
 -&gt; State
      (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg)))
-&gt; SlotMap Reg
-&gt; [LiveInstr instr]
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, [Maybe (Reg, Reg)])
forall (m :: * -&gt; *) acc x y.
Monad m =&gt;
(acc -&gt; x -&gt; m (acc, y)) -&gt; acc -&gt; [x] -&gt; m (acc, [y])
</span><a href="GHC.Utils.Monad.html#mapAccumLM"><span class="hs-identifier hs-var">mapAccumLM</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
-&gt; LiveInstr instr
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
</span><a href="#local-6989586621681022262"><span class="hs-identifier hs-var">slurpLI</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022266"><span class="hs-identifier hs-var">slotMap</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022267"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-431"></span><span>                </span><span class="annot"><span class="annottext">Bag (Reg, Reg)
-&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(Bag (Reg, Reg)
 -&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg)))
-&gt; Bag (Reg, Reg)
-&gt; State (UniqFM BlockId [SlotMap Reg]) (Bag (Reg, Reg))
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(Reg, Reg)] -&gt; Bag (Reg, Reg)
forall a. [a] -&gt; Bag a
</span><a href="GHC.Data.Bag.html#listToBag"><span class="hs-identifier hs-var">listToBag</span></a></span><span> </span><span class="annot"><span class="annottext">([(Reg, Reg)] -&gt; Bag (Reg, Reg)) -&gt; [(Reg, Reg)] -&gt; Bag (Reg, Reg)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe (Reg, Reg)] -&gt; [(Reg, Reg)]
forall a. [Maybe a] -&gt; [a]
</span><a href="../../base/src/Data.Maybe.html#catMaybes"><span class="hs-identifier hs-var">catMaybes</span></a></span><span> </span><span class="annot"><span class="annottext">[Maybe (Reg, Reg)]
</span><a href="#local-6989586621681022264"><span class="hs-identifier hs-var">mMoves</span></a></span><span>
</span><span id="line-432"></span><span>
</span><span id="line-433"></span><span>        </span><span class="annot"><a href="#local-6989586621681022262"><span class="hs-identifier hs-type">slurpLI</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-type">SlotMap</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>                           </span><span class="hs-comment">-- current slotMap</span><span>
</span><span id="line-434"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022849"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-435"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Utils.Monad.State.html#State"><span class="hs-identifier hs-type">State</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Types.Unique.FM.html#UniqFM"><span class="hs-identifier hs-type">UniqFM</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-type">SlotMap</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- blockId -&gt; [slot -&gt; reg]</span><span>
</span><span id="line-436"></span><span>                                                        </span><span class="hs-comment">--      for tracking slotMaps across jumps</span><span>
</span><span id="line-437"></span><span>
</span><span id="line-438"></span><span>                         </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-type">SlotMap</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>           </span><span class="hs-comment">-- new slotMap</span><span>
</span><span id="line-439"></span><span>                         </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>            </span><span class="hs-comment">-- maybe a new coalesce edge</span><span>
</span><span id="line-440"></span><span>
</span><span id="line-441"></span><span>        </span><span id="local-6989586621681022262"><span class="annot"><span class="annottext">slurpLI :: SlotMap Reg
-&gt; LiveInstr instr
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
</span><a href="#local-6989586621681022262"><span class="hs-identifier hs-var hs-var">slurpLI</span></a></span></span><span> </span><span id="local-6989586621681022259"><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span></span><span> </span><span id="local-6989586621681022258"><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022258"><span class="hs-identifier hs-var">li</span></a></span></span><span>
</span><span id="line-442"></span><span>
</span><span id="line-443"></span><span>                </span><span class="hs-comment">-- remember what reg was stored into the slot</span><span>
</span><span id="line-444"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-type">SPILL</span></a></span><span> </span><span id="local-6989586621681022257"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022257"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681022256"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022256"><span class="hs-identifier hs-var">slot</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022258"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-445"></span><span>                </span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022255"><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022255"><span class="hs-identifier hs-var">slotMap'</span></a></span></span><span>                      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; Int -&gt; Reg -&gt; SlotMap Reg
forall key elt.
Uniquable key =&gt;
UniqFM key elt -&gt; key -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addToUFM"><span class="hs-identifier hs-var">addToUFM</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022256"><span class="hs-identifier hs-var">slot</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022257"><span class="hs-identifier hs-var">reg</span></a></span><span>
</span><span id="line-446"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg, Maybe (Reg, Reg))
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022255"><span class="hs-identifier hs-var">slotMap'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-447"></span><span>
</span><span id="line-448"></span><span>                </span><span class="hs-comment">-- add an edge between the this reg and the last one stored into the slot</span><span>
</span><span id="line-449"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-type">RELOAD</span></a></span><span> </span><span id="local-6989586621681022253"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022253"><span class="hs-identifier hs-var">slot</span></a></span></span><span> </span><span id="local-6989586621681022252"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022252"><span class="hs-identifier hs-var">reg</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022258"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-450"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; Int -&gt; Maybe Reg
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022253"><span class="hs-identifier hs-var">slot</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-451"></span><span>                        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022250"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022250"><span class="hs-identifier hs-var">reg2</span></a></span></span><span>
</span><span id="line-452"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022252"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022250"><span class="hs-identifier hs-var">reg2</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg, Maybe (Reg, Reg))
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">(Reg, Reg) -&gt; Maybe (Reg, Reg)
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022252"><span class="hs-identifier hs-var">reg</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022250"><span class="hs-identifier hs-var">reg2</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-453"></span><span>                         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg, Maybe (Reg, Reg))
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-454"></span><span>
</span><span id="line-455"></span><span>                        </span><span class="annot"><span class="annottext">Maybe Reg
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg, Maybe (Reg, Reg))
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-456"></span><span>
</span><span id="line-457"></span><span>                </span><span class="hs-comment">-- if we hit a jump, remember the current slotMap</span><span>
</span><span id="line-458"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022248"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022248"><span class="hs-identifier hs-var">instr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022258"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-459"></span><span>                </span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022247"><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022247"><span class="hs-identifier hs-var">targets</span></a></span></span><span>                       </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">instr -&gt; [BlockId]
forall instr. Instruction instr =&gt; instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#jumpDestsOfInstr"><span class="hs-identifier hs-var">jumpDestsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022248"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-460"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022247"><span class="hs-identifier hs-var">targets</span></a></span><span>
</span><span id="line-461"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>    </span><span class="annot"><span class="annottext">(BlockId -&gt; State (UniqFM BlockId [SlotMap Reg]) ())
-&gt; [BlockId] -&gt; State (UniqFM BlockId [SlotMap Reg]) ()
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Foldable t, Monad m) =&gt;
(a -&gt; m b) -&gt; t a -&gt; m ()
</span><a href="../../base/src/Data.Foldable.html#mapM_"><span class="hs-identifier hs-var">mapM_</span></a></span><span>   </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg -&gt; BlockId -&gt; State (UniqFM BlockId [SlotMap Reg]) ()
forall {key} {a}.
Uniquable key =&gt;
a -&gt; key -&gt; State (UniqFM key [a]) ()
</span><a href="#local-6989586621681022244"><span class="hs-identifier hs-var">accSlotMap</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022247"><span class="hs-identifier hs-var">targets</span></a></span><span>
</span><span id="line-462"></span><span>                        </span><span class="annot"><span class="annottext">(SlotMap Reg, Maybe (Reg, Reg))
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-463"></span><span>
</span><span id="line-464"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-465"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg, Maybe (Reg, Reg))
-&gt; State
     (UniqFM BlockId [SlotMap Reg]) (SlotMap Reg, Maybe (Reg, Reg))
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022259"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe (Reg, Reg)
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-466"></span><span>
</span><span id="line-467"></span><span>        </span><span class="hs-comment">-- record a slotmap for an in edge to this block</span><span>
</span><span id="line-468"></span><span>        </span><span id="local-6989586621681022244"><span class="annot"><span class="annottext">accSlotMap :: a -&gt; key -&gt; State (UniqFM key [a]) ()
</span><a href="#local-6989586621681022244"><span class="hs-identifier hs-var hs-var">accSlotMap</span></a></span></span><span> </span><span id="local-6989586621681022241"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681022241"><span class="hs-identifier hs-var">slotMap</span></a></span></span><span> </span><span id="local-6989586621681022240"><span class="annot"><span class="annottext">key
</span><a href="#local-6989586621681022240"><span class="hs-identifier hs-var">blockId</span></a></span></span><span>
</span><span id="line-469"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(UniqFM key [a] -&gt; UniqFM key [a]) -&gt; State (UniqFM key [a]) ()
forall s. (s -&gt; s) -&gt; State s ()
</span><a href="GHC.Utils.Monad.State.html#modify"><span class="hs-identifier hs-var">modify</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681022238"><span class="annot"><span class="annottext">UniqFM key [a]
</span><a href="#local-6989586621681022238"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a] -&gt; [a])
-&gt; UniqFM key [a] -&gt; key -&gt; [a] -&gt; UniqFM key [a]
forall key elt.
Uniquable key =&gt;
(elt -&gt; elt -&gt; elt)
-&gt; UniqFM key elt -&gt; key -&gt; elt -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#addToUFM_C"><span class="hs-identifier hs-var">addToUFM_C</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">(++)</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM key [a]
</span><a href="#local-6989586621681022238"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">key
</span><a href="#local-6989586621681022240"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681022241"><span class="hs-identifier hs-var">slotMap</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-470"></span><span>
</span><span id="line-471"></span><span>        </span><span class="hs-comment">-- work out the slot map on entry to this block</span><span>
</span><span id="line-472"></span><span>        </span><span class="hs-comment">--      if we have slot maps for multiple in-edges then we need to merge them.</span><span>
</span><span id="line-473"></span><span>        </span><span id="local-6989586621681022265"><span class="annot"><span class="annottext">getSlotMap :: key -&gt; State (UniqFM key [SlotMap Reg]) (SlotMap Reg)
</span><a href="#local-6989586621681022265"><span class="hs-identifier hs-var hs-var">getSlotMap</span></a></span></span><span> </span><span id="local-6989586621681022231"><span class="annot"><span class="annottext">key
</span><a href="#local-6989586621681022231"><span class="hs-identifier hs-var">blockId</span></a></span></span><span>
</span><span id="line-474"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022230"><span class="annot"><span class="annottext">UniqFM key [SlotMap Reg]
</span><a href="#local-6989586621681022230"><span class="hs-identifier hs-var">map</span></a></span></span><span>             </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">State (UniqFM key [SlotMap Reg]) (UniqFM key [SlotMap Reg])
forall s. State s s
</span><a href="GHC.Utils.Monad.State.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-475"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681022228"><span class="annot"><span class="annottext">slotMaps :: [SlotMap Reg]
</span><a href="#local-6989586621681022228"><span class="hs-identifier hs-var hs-var">slotMaps</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SlotMap Reg] -&gt; Maybe [SlotMap Reg] -&gt; [SlotMap Reg]
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqFM key [SlotMap Reg] -&gt; key -&gt; Maybe [SlotMap Reg]
forall key elt. Uniquable key =&gt; UniqFM key elt -&gt; key -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM"><span class="hs-identifier hs-var">lookupUFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM key [SlotMap Reg]
</span><a href="#local-6989586621681022230"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">key
</span><a href="#local-6989586621681022231"><span class="hs-identifier hs-var">blockId</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>                </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; State (UniqFM key [SlotMap Reg]) (SlotMap Reg)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>          </span><span class="annot"><span class="annottext">(SlotMap Reg -&gt; State (UniqFM key [SlotMap Reg]) (SlotMap Reg))
-&gt; SlotMap Reg -&gt; State (UniqFM key [SlotMap Reg]) (SlotMap Reg)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(SlotMap Reg -&gt; SlotMap Reg -&gt; SlotMap Reg)
-&gt; SlotMap Reg -&gt; [SlotMap Reg] -&gt; SlotMap Reg
forall (t :: * -&gt; *) a b.
Foldable t =&gt;
(a -&gt; b -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldr"><span class="hs-identifier hs-var">foldr</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; SlotMap Reg -&gt; SlotMap Reg
</span><a href="#local-6989586621681022225"><span class="hs-identifier hs-var">mergeSlotMaps</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
forall key elt. UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#emptyUFM"><span class="hs-identifier hs-var">emptyUFM</span></a></span><span> </span><span class="annot"><span class="annottext">[SlotMap Reg]
</span><a href="#local-6989586621681022228"><span class="hs-identifier hs-var">slotMaps</span></a></span><span>
</span><span id="line-477"></span><span>
</span><span id="line-478"></span><span>        </span><span class="annot"><a href="#local-6989586621681022225"><span class="hs-identifier hs-type">mergeSlotMaps</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-type">SlotMap</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-type">SlotMap</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SlotMap"><span class="hs-identifier hs-type">SlotMap</span></a></span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span>
</span><span id="line-479"></span><span>        </span><span id="local-6989586621681022225"><span class="annot"><span class="annottext">mergeSlotMaps :: SlotMap Reg -&gt; SlotMap Reg -&gt; SlotMap Reg
</span><a href="#local-6989586621681022225"><span class="hs-identifier hs-var hs-var">mergeSlotMaps</span></a></span></span><span> </span><span id="local-6989586621681022224"><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022224"><span class="hs-identifier hs-var">map1</span></a></span></span><span> </span><span id="local-6989586621681022223"><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022223"><span class="hs-identifier hs-var">map2</span></a></span></span><span>
</span><span id="line-480"></span><span>                </span><span class="hs-comment">-- toList sadly means we have to use the _Directly style</span><span>
</span><span id="line-481"></span><span>                </span><span class="hs-comment">-- functions.</span><span>
</span><span id="line-482"></span><span>                </span><span class="hs-comment">-- TODO: We shouldn't need to go through a list here.</span><span>
</span><span id="line-483"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(Unique, Reg)] -&gt; SlotMap Reg
forall elt key. [(Unique, elt)] -&gt; UniqFM key elt
</span><a href="GHC.Types.Unique.FM.html#listToUFM_Directly"><span class="hs-identifier hs-var">listToUFM_Directly</span></a></span><span>
</span><span id="line-484"></span><span>                </span><span class="annot"><span class="annottext">([(Unique, Reg)] -&gt; SlotMap Reg) -&gt; [(Unique, Reg)] -&gt; SlotMap Reg
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681022221"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022220"><span class="hs-identifier hs-var">r1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-485"></span><span>                  </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022221"><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681022221"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022220"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022220"><span class="hs-identifier hs-var">r1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; [(Unique, Reg)]
forall key elt. UniqFM key elt -&gt; [(Unique, elt)]
</span><a href="GHC.Types.Unique.FM.html#nonDetUFMToList"><span class="hs-identifier hs-var">nonDetUFMToList</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022224"><span class="hs-identifier hs-var">map1</span></a></span><span>
</span><span id="line-486"></span><span>                  </span><span class="hs-comment">-- This is non-deterministic but we do not</span><span>
</span><span id="line-487"></span><span>                  </span><span class="hs-comment">-- currently support deterministic code-generation.</span><span>
</span><span id="line-488"></span><span>                  </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-489"></span><span>                  </span><span class="hs-special">,</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">SlotMap Reg -&gt; Unique -&gt; Maybe Reg
forall key elt. UniqFM key elt -&gt; Unique -&gt; Maybe elt
</span><a href="GHC.Types.Unique.FM.html#lookupUFM_Directly"><span class="hs-identifier hs-var">lookupUFM_Directly</span></a></span><span> </span><span class="annot"><span class="annottext">SlotMap Reg
</span><a href="#local-6989586621681022223"><span class="hs-identifier hs-var">map2</span></a></span><span> </span><span class="annot"><span class="annottext">Unique
</span><a href="#local-6989586621681022221"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-490"></span><span>                          </span><span class="annot"><span class="annottext">Maybe Reg
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-491"></span><span>                          </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022217"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022217"><span class="hs-identifier hs-var">r2</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022220"><span class="hs-identifier hs-var">r1</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022217"><span class="hs-identifier hs-var">r2</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-492"></span><span>
</span><span id="line-493"></span><span>
</span><span id="line-494"></span><span class="hs-comment">-- | Strip away liveness information, yielding NatCmmDecl</span><span>
</span><span id="line-495"></span><span id="local-6989586621681022800"><span id="local-6989586621681022801"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLive"><span class="hs-identifier hs-type">stripLive</span></a></span><span>
</span><span id="line-496"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022801"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022800"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022800"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-497"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span>
</span><span id="line-498"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022801"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022800"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-499"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022801"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022800"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-500"></span><span>
</span><span id="line-501"></span><span id="stripLive"><span class="annot"><span class="annottext">stripLive :: forall statics instr.
(Outputable statics, Outputable instr, Instruction instr) =&gt;
NCGConfig -&gt; LiveCmmDecl statics instr -&gt; NatCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLive"><span class="hs-identifier hs-var hs-var">stripLive</span></a></span></span><span> </span><span id="local-6989586621681022210"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681022210"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span id="local-6989586621681022209"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022209"><span class="hs-identifier hs-var">live</span></a></span></span><span>
</span><span id="line-502"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr -&gt; NatCmmDecl statics instr
forall statics instr.
(Outputable statics, Outputable instr, Instruction instr) =&gt;
LiveCmmDecl statics instr -&gt; NatCmmDecl statics instr
</span><a href="#local-6989586621681022208"><span class="hs-identifier hs-var">stripCmm</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022209"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-503"></span><span>
</span><span id="line-504"></span><span> </span><span class="hs-keyword">where</span><span>  </span><span id="local-6989586621681022795"><span id="local-6989586621681022796"><span class="annot"><a href="#local-6989586621681022208"><span class="hs-identifier hs-type">stripCmm</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022796"><span class="hs-identifier hs-type">statics</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022795"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022795"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-505"></span><span>                 </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022796"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022795"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022796"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022795"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-506"></span><span>        </span><span id="local-6989586621681022208"><span class="annot"><span class="annottext">stripCmm :: forall statics instr.
(Outputable statics, Outputable instr, Instruction instr) =&gt;
LiveCmmDecl statics instr -&gt; NatCmmDecl statics instr
</span><a href="#local-6989586621681022208"><span class="hs-identifier hs-var hs-var">stripCmm</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span id="local-6989586621681022190"><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681022190"><span class="hs-identifier hs-var">sec</span></a></span></span><span> </span><span id="local-6989586621681022189"><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681022189"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Section
-&gt; statics
-&gt; GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
forall d h g. Section -&gt; d -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-var">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681022190"><span class="hs-identifier hs-var">sec</span></a></span><span> </span><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681022189"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-507"></span><span>        </span><span class="annot"><a href="#local-6989586621681022208"><span class="hs-identifier hs-var">stripCmm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span> </span><span id="local-6989586621681022188"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022188"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022187"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022187"><span class="hs-identifier hs-var">first_id</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[BlockId]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621681022186"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022186"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span id="local-6989586621681022185"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022185"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span id="local-6989586621681022184"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022184"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-508"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681022183"><span class="annot"><span class="annottext">final_blocks :: [LiveBasicBlock instr]
</span><a href="#local-6989586621681022183"><span class="hs-identifier hs-var hs-var">final_blocks</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)] -&gt; [LiveBasicBlock instr]
forall a. [SCC a] -&gt; [a]
</span><a href="../../containers/src/Data.Graph.html#flattenSCCs"><span class="hs-identifier hs-var">flattenSCCs</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022184"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-509"></span><span>
</span><span id="line-510"></span><span>                </span><span class="hs-comment">-- make sure the block that was first in the input list</span><span>
</span><span id="line-511"></span><span>                </span><span class="hs-comment">--      stays at the front of the output. This is the entry point</span><span>
</span><span id="line-512"></span><span>                </span><span class="hs-comment">--      of the proc, and it needs to come first.</span><span>
</span><span id="line-513"></span><span>                </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681022182"><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681022182"><span class="hs-identifier hs-var">first'</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022181"><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022181"><span class="hs-identifier hs-var">rest'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-514"></span><span>                                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LiveBasicBlock instr -&gt; Bool)
-&gt; [LiveBasicBlock instr]
-&gt; ([LiveBasicBlock instr], [LiveBasicBlock instr])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/Data.OldList.html#partition"><span class="hs-identifier hs-var">partition</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; BlockId -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022187"><span class="hs-identifier hs-var">first_id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Bool)
-&gt; (LiveBasicBlock instr -&gt; BlockId)
-&gt; LiveBasicBlock instr
-&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; BlockId
forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022183"><span class="hs-identifier hs-var">final_blocks</span></a></span><span>
</span><span id="line-515"></span><span>
</span><span id="line-516"></span><span>           </span><span class="hs-keyword">in</span><span>   </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; ListGraph instr
-&gt; GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022188"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022186"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022185"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-517"></span><span>                          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[GenBasicBlock instr] -&gt; ListGraph instr
forall i. [GenBasicBlock i] -&gt; ListGraph i
</span><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-var">ListGraph</span></a></span><span> </span><span class="annot"><span class="annottext">([GenBasicBlock instr] -&gt; ListGraph instr)
-&gt; [GenBasicBlock instr] -&gt; ListGraph instr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(LiveBasicBlock instr -&gt; GenBasicBlock instr)
-&gt; [LiveBasicBlock instr] -&gt; [GenBasicBlock instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; LiveBasicBlock instr -&gt; GenBasicBlock instr
forall instr.
Instruction instr =&gt;
NCGConfig -&gt; LiveBasicBlock instr -&gt; NatBasicBlock instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLiveBlock"><span class="hs-identifier hs-var">stripLiveBlock</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681022210"><span class="hs-identifier hs-var">config</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([LiveBasicBlock instr] -&gt; [GenBasicBlock instr])
-&gt; [LiveBasicBlock instr] -&gt; [GenBasicBlock instr]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681022182"><span class="hs-identifier hs-var">first'</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr
-&gt; [LiveBasicBlock instr] -&gt; [LiveBasicBlock instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681022181"><span class="hs-identifier hs-var">rest'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-518"></span><span>
</span><span id="line-519"></span><span>        </span><span class="hs-comment">-- If the proc has blocks but we don't know what the first one was, then we're dead.</span><span>
</span><span id="line-520"></span><span>        </span><span class="annot"><a href="#local-6989586621681022208"><span class="hs-identifier hs-var">stripCmm</span></a></span><span> </span><span id="local-6989586621681022178"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022178"><span class="hs-identifier hs-var">proc</span></a></span></span><span>
</span><span id="line-521"></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Char]
-&gt; SDoc
-&gt; GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
forall a. HasCallStack =&gt; [Char] -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;RegAlloc.Liveness.stripLive: no first_id on proc&quot;</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LiveCmmDecl statics instr -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022178"><span class="hs-identifier hs-var">proc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-522"></span><span>
</span><span id="line-523"></span><span class="hs-comment">-- | Strip away liveness information from a basic block,</span><span>
</span><span id="line-524"></span><span class="hs-comment">--   and make real spill instructions out of SPILL, RELOAD pseudos along the way.</span><span>
</span><span id="line-525"></span><span>
</span><span id="line-526"></span><span id="local-6989586621681022784"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLiveBlock"><span class="hs-identifier hs-type">stripLiveBlock</span></a></span><span>
</span><span id="line-527"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022784"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-528"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Config.html#NCGConfig"><span class="hs-identifier hs-type">NCGConfig</span></a></span><span>
</span><span id="line-529"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022784"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-530"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatBasicBlock"><span class="hs-identifier hs-type">NatBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022784"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-531"></span><span>
</span><span id="line-532"></span><span id="stripLiveBlock"><span class="annot"><span class="annottext">stripLiveBlock :: forall instr.
Instruction instr =&gt;
NCGConfig -&gt; LiveBasicBlock instr -&gt; NatBasicBlock instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#stripLiveBlock"><span class="hs-identifier hs-var hs-var">stripLiveBlock</span></a></span></span><span> </span><span id="local-6989586621681022166"><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681022166"><span class="hs-identifier hs-var">config</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022165"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022165"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681022164"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022164"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-533"></span><span> </span><span class="hs-glyph">=</span><span>      </span><span class="annot"><span class="annottext">BlockId -&gt; [instr] -&gt; GenBasicBlock instr
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022165"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022163"><span class="hs-identifier hs-var">instrs'</span></a></span><span>
</span><span id="line-534"></span><span>
</span><span id="line-535"></span><span> </span><span class="hs-keyword">where</span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681022163"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022163"><span class="hs-identifier hs-var">instrs'</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-536"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">State Int [instr] -&gt; Int -&gt; ([instr], Int)
forall s a. State s a -&gt; s -&gt; (a, s)
</span><a href="GHC.Utils.Monad.State.html#runState"><span class="hs-identifier hs-var">runState</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[instr] -&gt; [LiveInstr instr] -&gt; State Int [instr]
</span><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022164"><span class="hs-identifier hs-var">lis</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>
</span><span id="line-537"></span><span>
</span><span id="line-538"></span><span>        </span><span id="local-6989586621681022162"><span class="annot"><span class="annottext">spillNat :: [instr] -&gt; [LiveInstr instr] -&gt; State Int [instr]
</span><a href="#local-6989586621681022162"><span class="hs-identifier hs-var hs-var">spillNat</span></a></span></span><span> </span><span id="local-6989586621681022161"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022161"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-539"></span><span>         </span><span class="hs-glyph">=</span><span>      </span><span class="annot"><span class="annottext">[instr] -&gt; State Int [instr]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[instr] -&gt; [instr]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022161"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-540"></span><span>
</span><span id="line-541"></span><span>        </span><span class="annot"><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span id="local-6989586621681022159"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022159"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#SPILL"><span class="hs-identifier hs-type">SPILL</span></a></span><span> </span><span id="local-6989586621681022158"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022158"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span id="local-6989586621681022157"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022157"><span class="hs-identifier hs-var">slot</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022156"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022156"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-542"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022155"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022155"><span class="hs-identifier hs-var">delta</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">State Int Int
forall s. State s s
</span><a href="GHC.Utils.Monad.State.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-543"></span><span>                </span><span class="annot"><span class="annottext">[instr] -&gt; [LiveInstr instr] -&gt; State Int [instr]
</span><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
forall instr.
Instruction instr =&gt;
NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#mkSpillInstr"><span class="hs-identifier hs-var">mkSpillInstr</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681022166"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022158"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022155"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022157"><span class="hs-identifier hs-var">slot</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; [instr] -&gt; [instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022159"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022156"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-544"></span><span>
</span><span id="line-545"></span><span>        </span><span class="annot"><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span id="local-6989586621681022154"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022154"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RELOAD"><span class="hs-identifier hs-type">RELOAD</span></a></span><span> </span><span id="local-6989586621681022153"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022153"><span class="hs-identifier hs-var">slot</span></a></span></span><span> </span><span id="local-6989586621681022152"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022152"><span class="hs-identifier hs-var">reg</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022151"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022151"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-546"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span id="local-6989586621681022150"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022150"><span class="hs-identifier hs-var">delta</span></a></span></span><span>   </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">State Int Int
forall s. State s s
</span><a href="GHC.Utils.Monad.State.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-547"></span><span>                </span><span class="annot"><span class="annottext">[instr] -&gt; [LiveInstr instr] -&gt; State Int [instr]
</span><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
forall instr.
Instruction instr =&gt;
NCGConfig -&gt; Reg -&gt; Int -&gt; Int -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#mkLoadInstr"><span class="hs-identifier hs-var">mkLoadInstr</span></a></span><span> </span><span class="annot"><span class="annottext">NCGConfig
</span><a href="#local-6989586621681022166"><span class="hs-identifier hs-var">config</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022152"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022150"><span class="hs-identifier hs-var">delta</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022153"><span class="hs-identifier hs-var">slot</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; [instr] -&gt; [instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022154"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022151"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-548"></span><span>
</span><span id="line-549"></span><span>        </span><span class="annot"><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span id="local-6989586621681022149"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022149"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022148"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022148"><span class="hs-identifier hs-var">instr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022147"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022147"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-550"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022146"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022146"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">instr -&gt; Maybe Int
forall instr. Instruction instr =&gt; instr -&gt; Maybe Int
</span><a href="GHC.CmmToAsm.Instr.html#takeDeltaInstr"><span class="hs-identifier hs-var">takeDeltaInstr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022148"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-551"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>   </span><span class="annot"><span class="annottext">Int -&gt; State Int ()
forall s. s -&gt; State s ()
</span><a href="GHC.Utils.Monad.State.html#put"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621681022146"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-552"></span><span>                </span><span class="annot"><span class="annottext">[instr] -&gt; [LiveInstr instr] -&gt; State Int [instr]
</span><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022149"><span class="hs-identifier hs-var">acc</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022147"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-553"></span><span>
</span><span id="line-554"></span><span>        </span><span class="annot"><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span id="local-6989586621681022144"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022144"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-type">Instr</span></a></span><span> </span><span id="local-6989586621681022143"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022143"><span class="hs-identifier hs-var">instr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022142"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022142"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-555"></span><span>         </span><span class="hs-glyph">=</span><span>      </span><span class="annot"><span class="annottext">[instr] -&gt; [LiveInstr instr] -&gt; State Int [instr]
</span><a href="#local-6989586621681022162"><span class="hs-identifier hs-var">spillNat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022143"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; [instr] -&gt; [instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022144"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022142"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-556"></span><span>
</span><span id="line-557"></span><span>
</span><span id="line-558"></span><span class="hs-comment">-- | Erase Delta instructions.</span><span>
</span><span id="line-559"></span><span>
</span><span id="line-560"></span><span id="local-6989586621681022776"><span id="local-6989586621681022777"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#eraseDeltasLive"><span class="hs-identifier hs-type">eraseDeltasLive</span></a></span><span>
</span><span id="line-561"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022777"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-562"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022776"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022777"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-563"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022776"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022777"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span id="eraseDeltasLive"><span class="annot"><span class="annottext">eraseDeltasLive :: forall instr statics.
Instruction instr =&gt;
LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#eraseDeltasLive"><span class="hs-identifier hs-var hs-var">eraseDeltasLive</span></a></span></span><span> </span><span id="local-6989586621681022139"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022139"><span class="hs-identifier hs-var">cmm</span></a></span></span><span>
</span><span id="line-566"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(LiveBasicBlock instr -&gt; LiveBasicBlock instr)
-&gt; LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
forall instr statics.
(LiveBasicBlock instr -&gt; LiveBasicBlock instr)
-&gt; LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#mapBlockTop"><span class="hs-identifier hs-var">mapBlockTop</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; LiveBasicBlock instr
forall {instr}.
Instruction instr =&gt;
GenBasicBlock (LiveInstr instr) -&gt; GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022138"><span class="hs-identifier hs-var">eraseBlock</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022139"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-567"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-568"></span><span>        </span><span id="local-6989586621681022138"><span class="annot"><span class="annottext">eraseBlock :: GenBasicBlock (LiveInstr instr) -&gt; GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022138"><span class="hs-identifier hs-var hs-var">eraseBlock</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022134"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022134"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681022133"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022133"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-569"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr)
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022134"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-570"></span><span>                </span><span class="annot"><span class="annottext">([LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr))
-&gt; [LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(LiveInstr instr -&gt; Bool) -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022132"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022132"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Int -&gt; Bool
forall a. Maybe a -&gt; Bool
</span><a href="../../base/src/Data.Maybe.html#isJust"><span class="hs-identifier hs-var">isJust</span></a></span><span> </span><span class="annot"><span class="annottext">(Maybe Int -&gt; Bool) -&gt; Maybe Int -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Int
forall instr. Instruction instr =&gt; instr -&gt; Maybe Int
</span><a href="GHC.CmmToAsm.Instr.html#takeDeltaInstr"><span class="hs-identifier hs-var">takeDeltaInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022132"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-571"></span><span>                </span><span class="annot"><span class="annottext">([LiveInstr instr] -&gt; [LiveInstr instr])
-&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022133"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-572"></span><span>
</span><span id="line-573"></span><span>
</span><span id="line-574"></span><span class="hs-comment">-- | Patch the registers in this code according to this register mapping.</span><span>
</span><span id="line-575"></span><span class="hs-comment">--   also erase reg -&gt; reg moves when the reg is the same.</span><span>
</span><span id="line-576"></span><span class="hs-comment">--   also erase reg -&gt; reg moves when the destination dies in this instr.</span><span>
</span><span id="line-577"></span><span id="local-6989586621681022769"><span id="local-6989586621681022770"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#patchEraseLive"><span class="hs-identifier hs-type">patchEraseLive</span></a></span><span>
</span><span id="line-578"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022770"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-579"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-580"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022769"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022770"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022769"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022770"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-581"></span><span>
</span><span id="line-582"></span><span id="patchEraseLive"><span class="annot"><span class="annottext">patchEraseLive :: forall instr statics.
Instruction instr =&gt;
(Reg -&gt; Reg)
-&gt; LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#patchEraseLive"><span class="hs-identifier hs-var hs-var">patchEraseLive</span></a></span></span><span> </span><span id="local-6989586621681022124"><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022124"><span class="hs-identifier hs-var">patchF</span></a></span></span><span> </span><span id="local-6989586621681022123"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022123"><span class="hs-identifier hs-var">cmm</span></a></span></span><span>
</span><span id="line-583"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="#local-6989586621681022122"><span class="hs-identifier hs-var">patchCmm</span></a></span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022123"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-584"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-585"></span><span>        </span><span id="local-6989586621681022122"><span class="annot"><span class="annottext">patchCmm :: LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="#local-6989586621681022122"><span class="hs-identifier hs-var hs-var">patchCmm</span></a></span></span><span> </span><span id="local-6989586621681022121"><span class="annot"><span class="annottext">cmm :: LiveCmmDecl statics instr
</span><a href="#local-6989586621681022121"><span class="hs-identifier hs-var">cmm</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681022121"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-586"></span><span>
</span><span id="line-587"></span><span>        </span><span class="annot"><a href="#local-6989586621681022122"><span class="hs-identifier hs-var">patchCmm</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681022120"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022120"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681022119"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022119"><span class="hs-keyword hs-var">label</span></a></span></span><span> </span><span id="local-6989586621681022118"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022118"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span id="local-6989586621681022117"><span class="annot"><span class="annottext">[SCC (GenBasicBlock (LiveInstr instr))]
</span><a href="#local-6989586621681022117"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-588"></span><span>         </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span> </span><span id="local-6989586621681022116"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022116"><span class="hs-identifier hs-var">static</span></a></span></span><span> </span><span id="local-6989586621681022115"><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022115"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681022114"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022114"><span class="hs-identifier hs-var">blockMap</span></a></span></span><span> </span><span id="local-6989586621681022113"><span class="annot"><span class="annottext">BlockMap IntSet
</span><a href="#local-6989586621681022113"><span class="hs-identifier hs-var">mLiveSlots</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022120"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-589"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-590"></span><span>                </span><span id="local-6989586621681022112"><span class="annot"><span class="annottext">patchRegSet :: UniqFM Reg Reg -&gt; RegSet
</span><a href="#local-6989586621681022112"><span class="hs-identifier hs-var hs-var">patchRegSet</span></a></span></span><span> </span><span id="local-6989586621681022111"><span class="annot"><span class="annottext">UniqFM Reg Reg
</span><a href="#local-6989586621681022111"><span class="hs-identifier hs-var">set</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">([Reg] -&gt; RegSet) -&gt; [Reg] -&gt; RegSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; Reg) -&gt; [Reg] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022124"><span class="hs-identifier hs-var">patchF</span></a></span><span> </span><span class="annot"><span class="annottext">([Reg] -&gt; [Reg]) -&gt; [Reg] -&gt; [Reg]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Reg Reg -&gt; [Reg]
forall key elt. UniqFM key elt -&gt; [elt]
</span><a href="GHC.Types.Unique.FM.html#nonDetEltsUFM"><span class="hs-identifier hs-var">nonDetEltsUFM</span></a></span><span> </span><span class="annot"><span class="annottext">UniqFM Reg Reg
</span><a href="#local-6989586621681022111"><span class="hs-identifier hs-var">set</span></a></span><span>
</span><span id="line-591"></span><span>                  </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-592"></span><span>                </span><span id="local-6989586621681022108"><span class="annot"><span class="annottext">blockMap' :: BlockMap RegSet
</span><a href="#local-6989586621681022108"><span class="hs-identifier hs-var hs-var">blockMap'</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(RegSet -&gt; RegSet) -&gt; BlockMap RegSet -&gt; BlockMap RegSet
forall (map :: * -&gt; *) a b. IsMap map =&gt; (a -&gt; b) -&gt; map a -&gt; map b
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapMap"><span class="hs-identifier hs-var">mapMap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UniqFM Reg Reg -&gt; RegSet
</span><a href="#local-6989586621681022112"><span class="hs-identifier hs-var">patchRegSet</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqFM Reg Reg -&gt; RegSet)
-&gt; (RegSet -&gt; UniqFM Reg Reg) -&gt; RegSet -&gt; RegSet
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; UniqFM Reg Reg
forall a. UniqSet a -&gt; UniqFM a a
</span><a href="GHC.Types.Unique.Set.html#getUniqSet"><span class="hs-identifier hs-var">getUniqSet</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022114"><span class="hs-identifier hs-var">blockMap</span></a></span><span>
</span><span id="line-593"></span><span>
</span><span id="line-594"></span><span>                </span><span id="local-6989586621681022106"><span class="annot"><span class="annottext">info' :: LiveInfo
</span><a href="#local-6989586621681022106"><span class="hs-identifier hs-var hs-var">info'</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [BlockId] -&gt; BlockMap RegSet -&gt; BlockMap IntSet -&gt; LiveInfo
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022116"><span class="hs-identifier hs-var">static</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022115"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681022108"><span class="hs-identifier hs-var">blockMap'</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
</span><a href="#local-6989586621681022113"><span class="hs-identifier hs-var">mLiveSlots</span></a></span><span>
</span><span id="line-595"></span><span>           </span><span class="hs-keyword">in</span><span>   </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (GenBasicBlock (LiveInstr instr))]
-&gt; LiveCmmDecl statics instr
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681022106"><span class="hs-identifier hs-var">info'</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022119"><span class="hs-keyword hs-var">label</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022118"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="annot"><span class="annottext">([SCC (GenBasicBlock (LiveInstr instr))]
 -&gt; LiveCmmDecl statics instr)
-&gt; [SCC (GenBasicBlock (LiveInstr instr))]
-&gt; LiveCmmDecl statics instr
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(SCC (GenBasicBlock (LiveInstr instr))
 -&gt; SCC (GenBasicBlock (LiveInstr instr)))
-&gt; [SCC (GenBasicBlock (LiveInstr instr))]
-&gt; [SCC (GenBasicBlock (LiveInstr instr))]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">SCC (GenBasicBlock (LiveInstr instr))
-&gt; SCC (GenBasicBlock (LiveInstr instr))
</span><a href="#local-6989586621681022105"><span class="hs-identifier hs-var">patchSCC</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (GenBasicBlock (LiveInstr instr))]
</span><a href="#local-6989586621681022117"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-596"></span><span>
</span><span id="line-597"></span><span>        </span><span id="local-6989586621681022105"><span class="annot"><span class="annottext">patchSCC :: SCC (GenBasicBlock (LiveInstr instr))
-&gt; SCC (GenBasicBlock (LiveInstr instr))
</span><a href="#local-6989586621681022105"><span class="hs-identifier hs-var hs-var">patchSCC</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-type">AcyclicSCC</span></a></span><span> </span><span id="local-6989586621681022104"><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022104"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
-&gt; SCC (GenBasicBlock (LiveInstr instr))
forall vertex. vertex -&gt; SCC vertex
</span><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-var">AcyclicSCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr) -&gt; GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022103"><span class="hs-identifier hs-var">patchBlock</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022104"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-598"></span><span>        </span><span class="annot"><a href="#local-6989586621681022105"><span class="hs-identifier hs-var">patchSCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-type">CyclicSCC</span></a></span><span>  </span><span id="local-6989586621681022102"><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681022102"><span class="hs-identifier hs-var">bs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
-&gt; SCC (GenBasicBlock (LiveInstr instr))
forall vertex. [vertex] -&gt; SCC vertex
</span><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-var">CyclicSCC</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(GenBasicBlock (LiveInstr instr)
 -&gt; GenBasicBlock (LiveInstr instr))
-&gt; [GenBasicBlock (LiveInstr instr)]
-&gt; [GenBasicBlock (LiveInstr instr)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr) -&gt; GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022103"><span class="hs-identifier hs-var">patchBlock</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681022102"><span class="hs-identifier hs-var">bs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-599"></span><span>
</span><span id="line-600"></span><span>        </span><span id="local-6989586621681022103"><span class="annot"><span class="annottext">patchBlock :: GenBasicBlock (LiveInstr instr) -&gt; GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681022103"><span class="hs-identifier hs-var hs-var">patchBlock</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022101"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022101"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681022100"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022100"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-601"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr)
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022101"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">([LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr))
-&gt; [LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="#local-6989586621681022099"><span class="hs-identifier hs-var">patchInstrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022100"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-602"></span><span>
</span><span id="line-603"></span><span>        </span><span id="local-6989586621681022099"><span class="annot"><span class="annottext">patchInstrs :: [LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="#local-6989586621681022099"><span class="hs-identifier hs-var hs-var">patchInstrs</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-604"></span><span>        </span><span class="annot"><a href="#local-6989586621681022099"><span class="hs-identifier hs-var">patchInstrs</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022098"><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022098"><span class="hs-identifier hs-var">li</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681022097"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022097"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-605"></span><span>
</span><span id="line-606"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022096"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022096"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022095"><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022095"><span class="hs-identifier hs-var">live</span></a></span></span><span class="hs-special">)</span><span>       </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022094"><span class="hs-identifier hs-var">li'</span></a></span><span>
</span><span id="line-607"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681022093"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022093"><span class="hs-identifier hs-var">r1</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681022092"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022092"><span class="hs-identifier hs-var">r2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe (Reg, Reg)
forall instr. Instruction instr =&gt; instr -&gt; Maybe (Reg, Reg)
</span><a href="GHC.CmmToAsm.Instr.html#takeRegRegMoveInstr"><span class="hs-identifier hs-var">takeRegRegMoveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022096"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-608"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg -&gt; Liveness -&gt; Bool
</span><a href="#local-6989586621681022091"><span class="hs-identifier hs-var">eatMe</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022093"><span class="hs-identifier hs-var">r1</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022092"><span class="hs-identifier hs-var">r2</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022095"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-609"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="#local-6989586621681022099"><span class="hs-identifier hs-var">patchInstrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022097"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-610"></span><span>
</span><span id="line-611"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-612"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022094"><span class="hs-identifier hs-var">li'</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="#local-6989586621681022099"><span class="hs-identifier hs-var">patchInstrs</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681022097"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-613"></span><span>
</span><span id="line-614"></span><span>                </span><span class="hs-keyword">where</span><span>   </span><span id="local-6989586621681022094"><span class="annot"><span class="annottext">li' :: LiveInstr instr
</span><a href="#local-6989586621681022094"><span class="hs-identifier hs-var hs-var">li'</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; Reg) -&gt; LiveInstr instr -&gt; LiveInstr instr
forall instr.
Instruction instr =&gt;
(Reg -&gt; Reg) -&gt; LiveInstr instr -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#patchRegsLiveInstr"><span class="hs-identifier hs-var">patchRegsLiveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022124"><span class="hs-identifier hs-var">patchF</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022098"><span class="hs-identifier hs-var">li</span></a></span><span>
</span><span id="line-615"></span><span>
</span><span id="line-616"></span><span>        </span><span id="local-6989586621681022091"><span class="annot"><span class="annottext">eatMe :: Reg -&gt; Reg -&gt; Liveness -&gt; Bool
</span><a href="#local-6989586621681022091"><span class="hs-identifier hs-var hs-var">eatMe</span></a></span></span><span>   </span><span id="local-6989586621681022086"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022086"><span class="hs-identifier hs-var">r1</span></a></span></span><span> </span><span id="local-6989586621681022085"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022085"><span class="hs-identifier hs-var">r2</span></a></span></span><span> </span><span id="local-6989586621681022084"><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022084"><span class="hs-identifier hs-var">live</span></a></span></span><span>
</span><span id="line-617"></span><span>                </span><span class="hs-comment">-- source and destination regs are the same</span><span>
</span><span id="line-618"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022086"><span class="hs-identifier hs-var">r1</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022085"><span class="hs-identifier hs-var">r2</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-619"></span><span>
</span><span id="line-620"></span><span>                </span><span class="hs-comment">-- destination reg is never used</span><span>
</span><span id="line-621"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Reg -&gt; RegSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-identifier hs-var">elementOfUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022085"><span class="hs-identifier hs-var">r2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var hs-var">liveBorn</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022084"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-622"></span><span>                </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg -&gt; RegSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-identifier hs-var">elementOfUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022085"><span class="hs-identifier hs-var">r2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022084"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; RegSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-identifier hs-var">elementOfUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681022085"><span class="hs-identifier hs-var">r2</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022084"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-623"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-624"></span><span>
</span><span id="line-625"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-626"></span><span>
</span><span id="line-627"></span><span>
</span><span id="line-628"></span><span class="hs-comment">-- | Patch registers in this LiveInstr, including the liveness information.</span><span>
</span><span id="line-629"></span><span class="hs-comment">--</span><span>
</span><span id="line-630"></span><span id="local-6989586621681022761"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#patchRegsLiveInstr"><span class="hs-identifier hs-type">patchRegsLiveInstr</span></a></span><span>
</span><span id="line-631"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022761"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-632"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Platform.Reg.html#Reg"><span class="hs-identifier hs-type">Reg</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-633"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022761"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022761"><span class="hs-identifier hs-type">instr</span></a></span></span><span>
</span><span id="line-634"></span><span>
</span><span id="line-635"></span><span id="patchRegsLiveInstr"><span class="annot"><span class="annottext">patchRegsLiveInstr :: forall instr.
Instruction instr =&gt;
(Reg -&gt; Reg) -&gt; LiveInstr instr -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#patchRegsLiveInstr"><span class="hs-identifier hs-var hs-var">patchRegsLiveInstr</span></a></span></span><span> </span><span id="local-6989586621681022075"><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022075"><span class="hs-identifier hs-var">patchF</span></a></span></span><span> </span><span id="local-6989586621681022074"><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022074"><span class="hs-identifier hs-var">li</span></a></span></span><span>
</span><span id="line-636"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681022074"><span class="hs-identifier hs-var">li</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-637"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022073"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022073"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-638"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstrSR instr -&gt; (Reg -&gt; Reg) -&gt; InstrSR instr
forall instr. Instruction instr =&gt; instr -&gt; (Reg -&gt; Reg) -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#patchRegsOfInstr"><span class="hs-identifier hs-var">patchRegsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022073"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022075"><span class="hs-identifier hs-var">patchF</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-639"></span><span>
</span><span id="line-640"></span><span>        </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681022072"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022072"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022071"><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022071"><span class="hs-identifier hs-var">live</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-641"></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span>
</span><span id="line-642"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">InstrSR instr -&gt; (Reg -&gt; Reg) -&gt; InstrSR instr
forall instr. Instruction instr =&gt; instr -&gt; (Reg -&gt; Reg) -&gt; instr
</span><a href="GHC.CmmToAsm.Instr.html#patchRegsOfInstr"><span class="hs-identifier hs-var">patchRegsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681022072"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022075"><span class="hs-identifier hs-var">patchF</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-643"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; Maybe Liveness
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022071"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-644"></span><span>                        </span><span class="hs-special">{</span><span> </span><span class="hs-comment">-- WARNING: have to go via lists here because patchF changes the uniq in the Reg</span><span>
</span><span id="line-645"></span><span>                          </span><span class="annot"><span class="annottext">liveBorn :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var">liveBorn</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; Reg) -&gt; RegSet -&gt; RegSet
forall b a. Uniquable b =&gt; (a -&gt; b) -&gt; UniqSet a -&gt; UniqSet b
</span><a href="GHC.Types.Unique.Set.html#mapUniqSet"><span class="hs-identifier hs-var">mapUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022075"><span class="hs-identifier hs-var">patchF</span></a></span><span> </span><span class="annot"><span class="annottext">(RegSet -&gt; RegSet) -&gt; RegSet -&gt; RegSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var hs-var">liveBorn</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022071"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-646"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">liveDieRead :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var">liveDieRead</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; Reg) -&gt; RegSet -&gt; RegSet
forall b a. Uniquable b =&gt; (a -&gt; b) -&gt; UniqSet a -&gt; UniqSet b
</span><a href="GHC.Types.Unique.Set.html#mapUniqSet"><span class="hs-identifier hs-var">mapUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022075"><span class="hs-identifier hs-var">patchF</span></a></span><span> </span><span class="annot"><span class="annottext">(RegSet -&gt; RegSet) -&gt; RegSet -&gt; RegSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022071"><span class="hs-identifier hs-var">live</span></a></span><span>
</span><span id="line-647"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">liveDieWrite :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var">liveDieWrite</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; Reg) -&gt; RegSet -&gt; RegSet
forall b a. Uniquable b =&gt; (a -&gt; b) -&gt; UniqSet a -&gt; UniqSet b
</span><a href="GHC.Types.Unique.Set.html#mapUniqSet"><span class="hs-identifier hs-var">mapUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; Reg
</span><a href="#local-6989586621681022075"><span class="hs-identifier hs-var">patchF</span></a></span><span> </span><span class="annot"><span class="annottext">(RegSet -&gt; RegSet) -&gt; RegSet -&gt; RegSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681022071"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-648"></span><span>                          </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-649"></span><span>
</span><span id="line-650"></span><span>
</span><span id="line-651"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-652"></span><span class="hs-comment">-- | Convert a NatCmmDecl to a LiveCmmDecl, with liveness information</span><span>
</span><span id="line-653"></span><span>
</span><span id="line-654"></span><span id="local-6989586621681022753"><span id="local-6989586621681022755"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#cmmTopLiveness"><span class="hs-identifier hs-type">cmmTopLiveness</span></a></span><span>
</span><span id="line-655"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022755"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022755"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-656"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-657"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022753"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022755"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-658"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022753"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022755"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-659"></span><span id="cmmTopLiveness"><span class="annot"><span class="annottext">cmmTopLiveness :: forall instr statics.
(Outputable instr, Instruction instr) =&gt;
Maybe CFG
-&gt; Platform
-&gt; NatCmmDecl statics instr
-&gt; UniqSM (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#cmmTopLiveness"><span class="hs-identifier hs-var hs-var">cmmTopLiveness</span></a></span></span><span> </span><span id="local-6989586621681022063"><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022063"><span class="hs-identifier hs-var">cfg</span></a></span></span><span> </span><span id="local-6989586621681022062"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022062"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681022061"><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681022061"><span class="hs-identifier hs-var">cmm</span></a></span></span><span>
</span><span id="line-660"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; LiveCmmDecl statics instr -&gt; UniqSM (LiveCmmDecl statics instr)
forall instr statics.
(Outputable instr, Instruction instr) =&gt;
Platform
-&gt; LiveCmmDecl statics instr -&gt; UniqSM (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#regLiveness"><span class="hs-identifier hs-var">regLiveness</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681022062"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">(LiveCmmDecl statics instr -&gt; UniqSM (LiveCmmDecl statics instr))
-&gt; LiveCmmDecl statics instr -&gt; UniqSM (LiveCmmDecl statics instr)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG -&gt; NatCmmDecl statics instr -&gt; LiveCmmDecl statics instr
forall instr statics.
(Instruction instr, Outputable instr) =&gt;
Maybe CFG -&gt; NatCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#natCmmTopToLive"><span class="hs-identifier hs-var">natCmmTopToLive</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022063"><span class="hs-identifier hs-var">cfg</span></a></span><span> </span><span class="annot"><span class="annottext">NatCmmDecl statics instr
</span><a href="#local-6989586621681022061"><span class="hs-identifier hs-var">cmm</span></a></span><span>
</span><span id="line-661"></span><span>
</span><span id="line-662"></span><span id="local-6989586621681022746"><span id="local-6989586621681022747"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#natCmmTopToLive"><span class="hs-identifier hs-type">natCmmTopToLive</span></a></span><span>
</span><span id="line-663"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022747"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022747"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-664"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatCmmDecl"><span class="hs-identifier hs-type">NatCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022746"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022747"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-665"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022746"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022747"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-666"></span><span>
</span><span id="line-667"></span><span id="natCmmTopToLive"><span class="annot"><span class="annottext">natCmmTopToLive :: forall instr statics.
(Instruction instr, Outputable instr) =&gt;
Maybe CFG -&gt; NatCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#natCmmTopToLive"><span class="hs-identifier hs-var hs-var">natCmmTopToLive</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span id="local-6989586621681022048"><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681022048"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681022047"><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681022047"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-668"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Section
-&gt; statics
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
forall d h g. Section -&gt; d -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-var">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681022048"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681022047"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-669"></span><span>
</span><span id="line-670"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#natCmmTopToLive"><span class="hs-identifier hs-var">natCmmTopToLive</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681022046"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022046"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681022045"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022045"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681022044"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022044"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-671"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [BlockId] -&gt; BlockMap RegSet -&gt; BlockMap IntSet -&gt; LiveInfo
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022046"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022045"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022044"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-672"></span><span>
</span><span id="line-673"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#natCmmTopToLive"><span class="hs-identifier hs-var">natCmmTopToLive</span></a></span><span> </span><span id="local-6989586621681022043"><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022043"><span class="hs-identifier hs-var">mCfg</span></a></span></span><span> </span><span id="local-6989586621681022042"><span class="annot"><span class="annottext">proc :: GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
</span><a href="#local-6989586621681022042"><span class="hs-identifier hs-var">proc</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681022041"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022041"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681022040"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022040"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681022039"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022039"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#ListGraph"><span class="hs-identifier hs-type">ListGraph</span></a></span><span> </span><span id="local-6989586621681022038"><span class="annot"><span class="annottext">blocks :: [GenBasicBlock instr]
</span><a href="#local-6989586621681022038"><span class="hs-identifier hs-var">blocks</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621681022037"><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681022037"><span class="hs-identifier hs-var">first</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-674"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [BlockId] -&gt; BlockMap RegSet -&gt; BlockMap IntSet -&gt; LiveInfo
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022036"><span class="hs-identifier hs-var">info'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022035"><span class="hs-identifier hs-var">first_id</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [BlockId] -&gt; [BlockId]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022034"><span class="hs-identifier hs-var">entry_ids</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-675"></span><span>                </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681022040"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681022039"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022033"><span class="hs-identifier hs-var">sccsLive</span></a></span><span>
</span><span id="line-676"></span><span>   </span><span class="hs-keyword">where</span><span>
</span><span id="line-677"></span><span>        </span><span id="local-6989586621681022035"><span class="annot"><span class="annottext">first_id :: BlockId
</span><a href="#local-6989586621681022035"><span class="hs-identifier hs-var hs-var">first_id</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr -&gt; BlockId
forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock instr
</span><a href="#local-6989586621681022037"><span class="hs-identifier hs-var">first</span></a></span><span>
</span><span id="line-678"></span><span>        </span><span id="local-6989586621681022032"><span class="annot"><span class="annottext">all_entry_ids :: [BlockId]
</span><a href="#local-6989586621681022032"><span class="hs-identifier hs-var hs-var">all_entry_ids</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
-&gt; [BlockId]
forall a i b. GenCmmDecl a (LabelMap i) (ListGraph b) -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#entryBlocks"><span class="hs-identifier hs-var">entryBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">GenCmmDecl statics (LabelMap RawCmmStatics) (ListGraph instr)
</span><a href="#local-6989586621681022042"><span class="hs-identifier hs-var">proc</span></a></span><span>
</span><span id="line-679"></span><span>        </span><span id="local-6989586621681022030"><span class="annot"><span class="annottext">sccs :: [SCC (GenBasicBlock instr)]
</span><a href="#local-6989586621681022030"><span class="hs-identifier hs-var hs-var">sccs</span></a></span></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
-&gt; [BlockId] -&gt; Maybe CFG -&gt; [SCC (GenBasicBlock instr)]
forall instr.
Instruction instr =&gt;
[NatBasicBlock instr]
-&gt; [BlockId] -&gt; Maybe CFG -&gt; [SCC (NatBasicBlock instr)]
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#sccBlocks"><span class="hs-identifier hs-var">sccBlocks</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock instr]
</span><a href="#local-6989586621681022038"><span class="hs-identifier hs-var">blocks</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022032"><span class="hs-identifier hs-var">all_entry_ids</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022043"><span class="hs-identifier hs-var">mCfg</span></a></span><span>
</span><span id="line-680"></span><span>        </span><span id="local-6989586621681022033"><span class="annot"><span class="annottext">sccsLive :: [SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681022033"><span class="hs-identifier hs-var hs-var">sccsLive</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SCC (GenBasicBlock instr) -&gt; SCC (LiveBasicBlock instr))
-&gt; [SCC (GenBasicBlock instr)] -&gt; [SCC (LiveBasicBlock instr)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(GenBasicBlock instr -&gt; LiveBasicBlock instr)
-&gt; SCC (GenBasicBlock instr) -&gt; SCC (LiveBasicBlock instr)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022028"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022028"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621681022027"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022027"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-681"></span><span>                                       </span><span class="annot"><span class="annottext">BlockId -&gt; [LiveInstr instr] -&gt; LiveBasicBlock instr
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022028"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(instr -&gt; LiveInstr instr) -&gt; [instr] -&gt; [LiveInstr instr]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681022026"><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022026"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">instr -&gt; InstrSR instr
forall instr. instr -&gt; InstrSR instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Instr"><span class="hs-identifier hs-var">Instr</span></a></span><span> </span><span class="annot"><span class="annottext">instr
</span><a href="#local-6989586621681022026"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022027"><span class="hs-identifier hs-var">instrs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-682"></span><span>                        </span><span class="annot"><span class="annottext">([SCC (GenBasicBlock instr)] -&gt; [SCC (LiveBasicBlock instr)])
-&gt; [SCC (GenBasicBlock instr)] -&gt; [SCC (LiveBasicBlock instr)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (GenBasicBlock instr)]
</span><a href="#local-6989586621681022030"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-683"></span><span>
</span><span id="line-684"></span><span>        </span><span id="local-6989586621681022034"><span class="annot"><span class="annottext">entry_ids :: [BlockId]
</span><a href="#local-6989586621681022034"><span class="hs-identifier hs-var hs-var">entry_ids</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockId -&gt; Bool) -&gt; [BlockId] -&gt; [BlockId]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; Bool
</span><a href="#local-6989586621681022025"><span class="hs-identifier hs-var">reachable_node</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([BlockId] -&gt; [BlockId])
-&gt; ([BlockId] -&gt; [BlockId]) -&gt; [BlockId] -&gt; [BlockId]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span>
</span><span id="line-685"></span><span>                          </span><span class="annot"><span class="annottext">(BlockId -&gt; Bool) -&gt; [BlockId] -&gt; [BlockId]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">BlockId -&gt; BlockId -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022035"><span class="hs-identifier hs-var">first_id</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([BlockId] -&gt; [BlockId]) -&gt; [BlockId] -&gt; [BlockId]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022032"><span class="hs-identifier hs-var">all_entry_ids</span></a></span><span>
</span><span id="line-686"></span><span>        </span><span id="local-6989586621681022036"><span class="annot"><span class="annottext">info' :: LabelMap RawCmmStatics
</span><a href="#local-6989586621681022036"><span class="hs-identifier hs-var hs-var">info'</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(KeyOf LabelMap -&gt; RawCmmStatics -&gt; Bool)
-&gt; LabelMap RawCmmStatics -&gt; LabelMap RawCmmStatics
forall (map :: * -&gt; *) a.
IsMap map =&gt;
(KeyOf map -&gt; a -&gt; Bool) -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapFilterWithKey"><span class="hs-identifier hs-var">mapFilterWithKey</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681022023"><span class="annot"><span class="annottext">KeyOf LabelMap
</span><a href="#local-6989586621681022023"><span class="hs-identifier hs-var">node</span></a></span></span><span> </span><span class="annot"><span class="annottext">RawCmmStatics
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; Bool
</span><a href="#local-6989586621681022025"><span class="hs-identifier hs-var">reachable_node</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681022023"><span class="hs-identifier hs-var">node</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681022041"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-687"></span><span>        </span><span id="local-6989586621681022025"><span class="annot"><span class="annottext">reachable_node :: BlockId -&gt; Bool
</span><a href="#local-6989586621681022025"><span class="hs-identifier hs-var hs-var">reachable_node</span></a></span></span><span>
</span><span id="line-688"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681022022"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681022022"><span class="hs-identifier hs-var">cfg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022043"><span class="hs-identifier hs-var">mCfg</span></a></span><span>
</span><span id="line-689"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">CFG -&gt; BlockId -&gt; Bool
</span><a href="GHC.CmmToAsm.CFG.html#hasNode"><span class="hs-identifier hs-var">hasNode</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681022022"><span class="hs-identifier hs-var">cfg</span></a></span><span>
</span><span id="line-690"></span><span>          </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-691"></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; BlockId -&gt; Bool
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-692"></span><span>
</span><span id="line-693"></span><span class="hs-comment">--</span><span>
</span><span id="line-694"></span><span class="hs-comment">-- Compute the liveness graph of the set of basic blocks.  Important:</span><span>
</span><span id="line-695"></span><span class="hs-comment">-- we also discard any unreachable code here, starting from the entry</span><span>
</span><span id="line-696"></span><span class="hs-comment">-- points (the first block in the list, and any blocks with info</span><span>
</span><span id="line-697"></span><span class="hs-comment">-- tables).  Unreachable code arises when code blocks are orphaned in</span><span>
</span><span id="line-698"></span><span class="hs-comment">-- earlier optimisation passes, and may confuse the register allocator</span><span>
</span><span id="line-699"></span><span class="hs-comment">-- by referring to registers that are not initialised.  It's easy to</span><span>
</span><span id="line-700"></span><span class="hs-comment">-- discard the unreachable code as part of the SCC pass, so that's</span><span>
</span><span id="line-701"></span><span class="hs-comment">-- exactly what we do. (#7574)</span><span>
</span><span id="line-702"></span><span class="hs-comment">--</span><span>
</span><span id="line-703"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#sccBlocks"><span class="hs-identifier hs-type">sccBlocks</span></a></span><span>
</span><span id="line-704"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-keyword">forall</span><span> </span><span id="local-6989586621681022739"><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span></span><span> </span><span class="hs-operator">.</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-705"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatBasicBlock"><span class="hs-identifier hs-type">NatBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-706"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-707"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.CFG.html#CFG"><span class="hs-identifier hs-type">CFG</span></a></span><span>
</span><span id="line-708"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatBasicBlock"><span class="hs-identifier hs-type">NatBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-709"></span><span>
</span><span id="line-710"></span><span id="sccBlocks"><span class="annot"><span class="annottext">sccBlocks :: forall instr.
Instruction instr =&gt;
[NatBasicBlock instr]
-&gt; [BlockId] -&gt; Maybe CFG -&gt; [SCC (NatBasicBlock instr)]
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#sccBlocks"><span class="hs-identifier hs-var hs-var">sccBlocks</span></a></span></span><span> </span><span id="local-6989586621681022010"><span class="annot"><span class="annottext">[NatBasicBlock instr]
</span><a href="#local-6989586621681022010"><span class="hs-identifier hs-var">blocks</span></a></span></span><span> </span><span id="local-6989586621681022009"><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022009"><span class="hs-identifier hs-var">entries</span></a></span></span><span> </span><span id="local-6989586621681022008"><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022008"><span class="hs-identifier hs-var">mcfg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(SCC (Node BlockId (NatBasicBlock instr))
 -&gt; SCC (NatBasicBlock instr))
-&gt; [SCC (Node BlockId (NatBasicBlock instr))]
-&gt; [SCC (NatBasicBlock instr)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Node BlockId (NatBasicBlock instr) -&gt; NatBasicBlock instr)
-&gt; SCC (Node BlockId (NatBasicBlock instr))
-&gt; SCC (NatBasicBlock instr)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr) -&gt; NatBasicBlock instr
forall key payload. Node key payload -&gt; payload
</span><a href="GHC.Data.Graph.Directed.html#node_payload"><span class="hs-identifier hs-var hs-var">node_payload</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[SCC (Node BlockId (NatBasicBlock instr))]
</span><a href="#local-6989586621681022006"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-711"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-712"></span><span>        </span><span class="annot"><a href="#local-6989586621681022005"><span class="hs-identifier hs-type">nodes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><a href="GHC.Data.Graph.Directed.html#Node"><span class="hs-identifier hs-type">Node</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#NatBasicBlock"><span class="hs-identifier hs-type">NatBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-713"></span><span>        </span><span id="local-6989586621681022005"><span class="annot"><span class="annottext">nodes :: [Node BlockId (NatBasicBlock instr)]
</span><a href="#local-6989586621681022005"><span class="hs-identifier hs-var hs-var">nodes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">NatBasicBlock instr
-&gt; BlockId -&gt; [BlockId] -&gt; Node BlockId (NatBasicBlock instr)
forall key payload. payload -&gt; key -&gt; [key] -&gt; Node key payload
</span><a href="GHC.Data.Graph.Directed.html#DigraphNode"><span class="hs-identifier hs-var">DigraphNode</span></a></span><span> </span><span class="annot"><span class="annottext">NatBasicBlock instr
</span><a href="#local-6989586621681022003"><span class="hs-identifier hs-var">block</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022002"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[instr] -&gt; [BlockId]
Instruction instr =&gt; [instr] -&gt; [BlockId]
</span><a href="#local-6989586621681022001"><span class="hs-identifier hs-var">getOutEdges</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022000"><span class="hs-identifier hs-var">instrs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-714"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681022003"><span class="annot"><span class="annottext">block :: NatBasicBlock instr
</span><a href="#local-6989586621681022003"><span class="hs-identifier hs-var">block</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681022002"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681022002"><span class="hs-identifier hs-var">id</span></a></span></span><span> </span><span id="local-6989586621681022000"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681022000"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[NatBasicBlock instr]
</span><a href="#local-6989586621681022010"><span class="hs-identifier hs-var">blocks</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-715"></span><span>
</span><span id="line-716"></span><span>        </span><span id="local-6989586621681021999"><span class="annot"><span class="annottext">g1 :: Graph (Node BlockId (NatBasicBlock instr))
</span><a href="#local-6989586621681021999"><span class="hs-identifier hs-var hs-var">g1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Node BlockId (NatBasicBlock instr)]
-&gt; Graph (Node BlockId (NatBasicBlock instr))
forall key payload.
Uniquable key =&gt;
[Node key payload] -&gt; Graph (Node key payload)
</span><a href="GHC.Data.Graph.Directed.html#graphFromEdgedVerticesUniq"><span class="hs-identifier hs-var">graphFromEdgedVerticesUniq</span></a></span><span> </span><span class="annot"><span class="annottext">[Node BlockId (NatBasicBlock instr)]
</span><a href="#local-6989586621681022005"><span class="hs-identifier hs-var">nodes</span></a></span><span>
</span><span id="line-717"></span><span>
</span><span id="line-718"></span><span>        </span><span class="annot"><a href="#local-6989586621681021997"><span class="hs-identifier hs-type">reachable</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Cmm.Dataflow.Label.html#LabelSet"><span class="hs-identifier hs-type">LabelSet</span></a></span><span>
</span><span id="line-719"></span><span>        </span><span id="local-6989586621681021997"><span class="annot"><span class="annottext">reachable :: LabelSet
</span><a href="#local-6989586621681021997"><span class="hs-identifier hs-var hs-var">reachable</span></a></span></span><span>
</span><span id="line-720"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681021996"><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681021996"><span class="hs-identifier hs-var">cfg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe CFG
</span><a href="#local-6989586621681022008"><span class="hs-identifier hs-var">mcfg</span></a></span><span>
</span><span id="line-721"></span><span>            </span><span class="hs-comment">-- Our CFG only contains reachable nodes by construction at this point.</span><span>
</span><span id="line-722"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ElemOf LabelSet] -&gt; LabelSet
forall set. IsSet set =&gt; [ElemOf set] -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setFromList"><span class="hs-identifier hs-var">setFromList</span></a></span><span> </span><span class="annot"><span class="annottext">([ElemOf LabelSet] -&gt; LabelSet) -&gt; [ElemOf LabelSet] -&gt; LabelSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">CFG -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.CFG.html#getCfgNodes"><span class="hs-identifier hs-var">getCfgNodes</span></a></span><span> </span><span class="annot"><span class="annottext">CFG
</span><a href="#local-6989586621681021996"><span class="hs-identifier hs-var">cfg</span></a></span><span>
</span><span id="line-723"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-724"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ElemOf LabelSet] -&gt; LabelSet
forall set. IsSet set =&gt; [ElemOf set] -&gt; set
</span><a href="GHC.Cmm.Dataflow.Collections.html#setFromList"><span class="hs-identifier hs-var">setFromList</span></a></span><span> </span><span class="annot"><span class="annottext">([ElemOf LabelSet] -&gt; LabelSet) -&gt; [ElemOf LabelSet] -&gt; LabelSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr) -&gt; BlockId
forall key payload. Node key payload -&gt; key
</span><a href="GHC.Data.Graph.Directed.html#node_key"><span class="hs-identifier hs-var hs-var">node_key</span></a></span><span> </span><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr)
</span><a href="#local-6989586621681021992"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681021992"><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr)
</span><a href="#local-6989586621681021992"><span class="hs-identifier hs-var">node</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Graph (Node BlockId (NatBasicBlock instr))
-&gt; [Node BlockId (NatBasicBlock instr)]
-&gt; [Node BlockId (NatBasicBlock instr)]
forall node. Graph node -&gt; [node] -&gt; [node]
</span><a href="GHC.Data.Graph.Directed.html#reachablesG"><span class="hs-identifier hs-var">reachablesG</span></a></span><span> </span><span class="annot"><span class="annottext">Graph (Node BlockId (NatBasicBlock instr))
</span><a href="#local-6989586621681021999"><span class="hs-identifier hs-var">g1</span></a></span><span> </span><span class="annot"><span class="annottext">[Node BlockId (NatBasicBlock instr)]
</span><a href="#local-6989586621681021990"><span class="hs-identifier hs-var">roots</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-725"></span><span>
</span><span id="line-726"></span><span>        </span><span id="local-6989586621681021989"><span class="annot"><span class="annottext">g2 :: Graph (Node BlockId (NatBasicBlock instr))
</span><a href="#local-6989586621681021989"><span class="hs-identifier hs-var hs-var">g2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Node BlockId (NatBasicBlock instr)]
-&gt; Graph (Node BlockId (NatBasicBlock instr))
forall key payload.
Uniquable key =&gt;
[Node key payload] -&gt; Graph (Node key payload)
</span><a href="GHC.Data.Graph.Directed.html#graphFromEdgedVerticesUniq"><span class="hs-identifier hs-var">graphFromEdgedVerticesUniq</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr)
</span><a href="#local-6989586621681021988"><span class="hs-identifier hs-var">node</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681021988"><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr)
</span><a href="#local-6989586621681021988"><span class="hs-identifier hs-var">node</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Node BlockId (NatBasicBlock instr)]
</span><a href="#local-6989586621681022005"><span class="hs-identifier hs-var">nodes</span></a></span><span>
</span><span id="line-727"></span><span>                                               </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr) -&gt; BlockId
forall key payload. Node key payload -&gt; key
</span><a href="GHC.Data.Graph.Directed.html#node_key"><span class="hs-identifier hs-var hs-var">node_key</span></a></span><span> </span><span class="annot"><span class="annottext">Node BlockId (NatBasicBlock instr)
</span><a href="#local-6989586621681021988"><span class="hs-identifier hs-var">node</span></a></span><span>
</span><span id="line-728"></span><span>                                                  </span><span class="annot"><span class="annottext">ElemOf LabelSet -&gt; LabelSet -&gt; Bool
forall set. IsSet set =&gt; ElemOf set -&gt; set -&gt; Bool
</span><a href="GHC.Cmm.Dataflow.Collections.html#setMember"><span class="hs-operator hs-var">`setMember`</span></a></span><span> </span><span class="annot"><span class="annottext">LabelSet
</span><a href="#local-6989586621681021997"><span class="hs-identifier hs-var">reachable</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-729"></span><span>
</span><span id="line-730"></span><span>        </span><span id="local-6989586621681022006"><span class="annot"><span class="annottext">sccs :: [SCC (Node BlockId (NatBasicBlock instr))]
</span><a href="#local-6989586621681022006"><span class="hs-identifier hs-var hs-var">sccs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Graph (Node BlockId (NatBasicBlock instr))
-&gt; [SCC (Node BlockId (NatBasicBlock instr))]
forall node. Graph node -&gt; [SCC node]
</span><a href="GHC.Data.Graph.Directed.html#stronglyConnCompG"><span class="hs-identifier hs-var">stronglyConnCompG</span></a></span><span> </span><span class="annot"><span class="annottext">Graph (Node BlockId (NatBasicBlock instr))
</span><a href="#local-6989586621681021989"><span class="hs-identifier hs-var">g2</span></a></span><span>
</span><span id="line-731"></span><span>
</span><span id="line-732"></span><span>        </span><span class="annot"><a href="#local-6989586621681022001"><span class="hs-identifier hs-type">getOutEdges</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621681022739"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-733"></span><span>        </span><span id="local-6989586621681022001"><span class="annot"><span class="annottext">getOutEdges :: Instruction instr =&gt; [instr] -&gt; [BlockId]
</span><a href="#local-6989586621681022001"><span class="hs-identifier hs-var hs-var">getOutEdges</span></a></span></span><span> </span><span id="local-6989586621681021982"><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681021982"><span class="hs-identifier hs-var">instrs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(instr -&gt; [BlockId]) -&gt; [instr] -&gt; [BlockId]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">instr -&gt; [BlockId]
forall instr. Instruction instr =&gt; instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#jumpDestsOfInstr"><span class="hs-identifier hs-var">jumpDestsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">[instr]
</span><a href="#local-6989586621681021982"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-734"></span><span>
</span><span id="line-735"></span><span>        </span><span class="hs-comment">-- This is truly ugly, but I don't see a good alternative.</span><span>
</span><span id="line-736"></span><span>        </span><span class="hs-comment">-- Digraph just has the wrong API.  We want to identify nodes</span><span>
</span><span id="line-737"></span><span>        </span><span class="hs-comment">-- by their keys (BlockId), but Digraph requires the whole</span><span>
</span><span id="line-738"></span><span>        </span><span class="hs-comment">-- node: (NatBasicBlock, BlockId, [BlockId]).  This takes</span><span>
</span><span id="line-739"></span><span>        </span><span class="hs-comment">-- advantage of the fact that Digraph only looks at the key,</span><span>
</span><span id="line-740"></span><span>        </span><span class="hs-comment">-- even though it asks for the whole triple.</span><span>
</span><span id="line-741"></span><span>        </span><span id="local-6989586621681021990"><span class="annot"><span class="annottext">roots :: [Node BlockId (NatBasicBlock instr)]
</span><a href="#local-6989586621681021990"><span class="hs-identifier hs-var hs-var">roots</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">NatBasicBlock instr
-&gt; BlockId -&gt; [BlockId] -&gt; Node BlockId (NatBasicBlock instr)
forall key payload. payload -&gt; key -&gt; [key] -&gt; Node key payload
</span><a href="GHC.Data.Graph.Directed.html#DigraphNode"><span class="hs-identifier hs-var">DigraphNode</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; NatBasicBlock instr
forall a. [Char] -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;sccBlocks&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021980"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Char] -&gt; [BlockId]
forall a. [Char] -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;sccBlocks&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-742"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681021980"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021980"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681022009"><span class="hs-identifier hs-var">entries</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-743"></span><span>
</span><span id="line-744"></span><span class="hs-comment">--------------------------------------------------------------------------------</span><span>
</span><span id="line-745"></span><span class="hs-comment">-- Annotate code with register liveness information</span><span>
</span><span id="line-746"></span><span class="hs-comment">--</span><span>
</span><span id="line-747"></span><span>
</span><span id="line-748"></span><span id="local-6989586621681022748"><span id="local-6989586621681022749"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#regLiveness"><span class="hs-identifier hs-type">regLiveness</span></a></span><span>
</span><span id="line-749"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022749"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022749"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-750"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-751"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022748"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022749"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-752"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Types.Unique.Supply.html#UniqSM"><span class="hs-identifier hs-type">UniqSM</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022748"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022749"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span></span><span>
</span><span id="line-753"></span><span>
</span><span id="line-754"></span><span id="regLiveness"><span class="annot"><span class="annottext">regLiveness :: forall instr statics.
(Outputable instr, Instruction instr) =&gt;
Platform
-&gt; LiveCmmDecl statics instr -&gt; UniqSM (LiveCmmDecl statics instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#regLiveness"><span class="hs-identifier hs-var hs-var">regLiveness</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span> </span><span id="local-6989586621681021969"><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681021969"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621681021968"><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681021968"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-755"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
-&gt; UniqSM
     (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
 -&gt; UniqSM
      (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]))
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
-&gt; UniqSM
     (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Section
-&gt; statics
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
forall d h g. Section -&gt; d -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-var">CmmData</span></a></span><span> </span><span class="annot"><span class="annottext">Section
</span><a href="#local-6989586621681021969"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">statics
</span><a href="#local-6989586621681021968"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-756"></span><span>
</span><span id="line-757"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#regLiveness"><span class="hs-identifier hs-var">regLiveness</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681021967"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681021967"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681021966"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681021966"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681021965"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681021965"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-758"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span> </span><span id="local-6989586621681021964"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681021964"><span class="hs-identifier hs-var">static</span></a></span></span><span> </span><span id="local-6989586621681021963"><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681021963"><span class="hs-identifier hs-var">mFirst</span></a></span></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681021967"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-759"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
-&gt; UniqSM
     (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
 -&gt; UniqSM
      (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]))
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
-&gt; UniqSM
     (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span>
</span><span id="line-760"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [BlockId] -&gt; BlockMap RegSet -&gt; BlockMap IntSet -&gt; LiveInfo
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681021964"><span class="hs-identifier hs-var">static</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681021963"><span class="hs-identifier hs-var">mFirst</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-761"></span><span>                        </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681021966"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681021965"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-762"></span><span>
</span><span id="line-763"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#regLiveness"><span class="hs-identifier hs-var">regLiveness</span></a></span><span> </span><span id="local-6989586621681021962"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021962"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681021961"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681021961"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681021960"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681021960"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681021959"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681021959"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span id="local-6989586621681021958"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021958"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-764"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-type">LiveInfo</span></a></span><span> </span><span id="local-6989586621681021957"><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681021957"><span class="hs-identifier hs-var">static</span></a></span></span><span> </span><span id="local-6989586621681021956"><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681021956"><span class="hs-identifier hs-var">mFirst</span></a></span></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681021955"><span class="annot"><span class="annottext">BlockMap IntSet
</span><a href="#local-6989586621681021955"><span class="hs-identifier hs-var">liveSlotsOnEntry</span></a></span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681021961"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-765"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>   </span><span class="hs-special">(</span><span id="local-6989586621681021954"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021954"><span class="hs-identifier hs-var">ann_sccs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681021953"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021953"><span class="hs-identifier hs-var">block_live</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
forall instr.
(Outputable instr, Instruction instr) =&gt;
Platform
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#computeLiveness"><span class="hs-identifier hs-var">computeLiveness</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021962"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021958"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-766"></span><span>
</span><span id="line-767"></span><span>          </span><span class="hs-keyword">in</span><span>    </span><span class="annot"><span class="annottext">GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
-&gt; UniqSM
     (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
 -&gt; UniqSM
      (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]))
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
-&gt; UniqSM
     (GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; GenCmmDecl statics LiveInfo [SCC (LiveBasicBlock instr)]
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
-&gt; [BlockId] -&gt; BlockMap RegSet -&gt; BlockMap IntSet -&gt; LiveInfo
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInfo"><span class="hs-identifier hs-var">LiveInfo</span></a></span><span> </span><span class="annot"><span class="annottext">LabelMap RawCmmStatics
</span><a href="#local-6989586621681021957"><span class="hs-identifier hs-var">static</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681021956"><span class="hs-identifier hs-var">mFirst</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021953"><span class="hs-identifier hs-var">block_live</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap IntSet
</span><a href="#local-6989586621681021955"><span class="hs-identifier hs-var">liveSlotsOnEntry</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-768"></span><span>                           </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681021960"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681021959"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021954"><span class="hs-identifier hs-var">ann_sccs</span></a></span><span>
</span><span id="line-769"></span><span>
</span><span id="line-770"></span><span>
</span><span id="line-771"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-772"></span><span class="hs-comment">-- | Check ordering of Blocks</span><span>
</span><span id="line-773"></span><span class="hs-comment">--   The computeLiveness function requires SCCs to be in reverse</span><span>
</span><span id="line-774"></span><span class="hs-comment">--   dependent order.  If they're not the liveness information will be</span><span>
</span><span id="line-775"></span><span class="hs-comment">--   wrong, and we'll get a bad allocation.  Better to check for this</span><span>
</span><span id="line-776"></span><span class="hs-comment">--   precondition explicitly or some other poor sucker will waste a</span><span>
</span><span id="line-777"></span><span class="hs-comment">--   day staring at bad assembly code..</span><span>
</span><span id="line-778"></span><span class="hs-comment">--</span><span>
</span><span id="line-779"></span><span id="local-6989586621681022709"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#checkIsReverseDependent"><span class="hs-identifier hs-type">checkIsReverseDependent</span></a></span><span>
</span><span id="line-780"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022709"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-781"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022709"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>         </span><span class="hs-comment">-- ^ SCCs of blocks that we're about to run the liveness determinator on.</span><span>
</span><span id="line-782"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Cmm.BlockId.html#BlockId"><span class="hs-identifier hs-type">BlockId</span></a></span></span><span>                        </span><span class="hs-comment">-- ^ BlockIds that fail the test (if any)</span><span>
</span><span id="line-783"></span><span>
</span><span id="line-784"></span><span id="checkIsReverseDependent"><span class="annot"><span class="annottext">checkIsReverseDependent :: forall instr.
Instruction instr =&gt;
[SCC (LiveBasicBlock instr)] -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#checkIsReverseDependent"><span class="hs-identifier hs-var hs-var">checkIsReverseDependent</span></a></span></span><span> </span><span id="local-6989586621681021948"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021948"><span class="hs-identifier hs-var">sccs'</span></a></span></span><span>
</span><span id="line-785"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; [SCC (LiveBasicBlock instr)] -&gt; Maybe BlockId
forall {instr}.
Instruction instr =&gt;
UniqSet BlockId
-&gt; [SCC (GenBasicBlock (LiveInstr instr))] -&gt; Maybe BlockId
</span><a href="#local-6989586621681021947"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021948"><span class="hs-identifier hs-var">sccs'</span></a></span><span>
</span><span id="line-786"></span><span>
</span><span id="line-787"></span><span> </span><span class="hs-keyword">where</span><span>  </span><span id="local-6989586621681021947"><span class="annot"><span class="annottext">go :: UniqSet BlockId
-&gt; [SCC (GenBasicBlock (LiveInstr instr))] -&gt; Maybe BlockId
</span><a href="#local-6989586621681021947"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-788"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe BlockId
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-789"></span><span>
</span><span id="line-790"></span><span>        </span><span class="annot"><a href="#local-6989586621681021947"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681021941"><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021941"><span class="hs-identifier hs-var">blocksSeen</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-type">AcyclicSCC</span></a></span><span> </span><span id="local-6989586621681021940"><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681021940"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681021939"><span class="annot"><span class="annottext">[SCC (GenBasicBlock (LiveInstr instr))]
</span><a href="#local-6989586621681021939"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-791"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681021938"><span class="annot"><span class="annottext">dests :: UniqSet BlockId
</span><a href="#local-6989586621681021938"><span class="hs-identifier hs-var hs-var">dests</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr) -&gt; UniqSet BlockId
forall {instr}.
Instruction instr =&gt;
GenBasicBlock (LiveInstr instr) -&gt; UniqSet BlockId
</span><a href="#local-6989586621681021937"><span class="hs-identifier hs-var">slurpJumpDestsOfBlock</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681021940"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-792"></span><span>                </span><span id="local-6989586621681021936"><span class="annot"><span class="annottext">blocksSeen' :: UniqSet BlockId
</span><a href="#local-6989586621681021936"><span class="hs-identifier hs-var hs-var">blocksSeen'</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; UniqSet BlockId -&gt; UniqSet BlockId
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-identifier hs-var">unionUniqSets</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021941"><span class="hs-identifier hs-var">blocksSeen</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqSet BlockId -&gt; UniqSet BlockId)
-&gt; UniqSet BlockId -&gt; UniqSet BlockId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; UniqSet BlockId
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr) -&gt; BlockId
forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681021940"><span class="hs-identifier hs-var">block</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-793"></span><span>                </span><span id="local-6989586621681021935"><span class="annot"><span class="annottext">badDests :: UniqSet BlockId
</span><a href="#local-6989586621681021935"><span class="hs-identifier hs-var hs-var">badDests</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021938"><span class="hs-identifier hs-var">dests</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; UniqSet BlockId -&gt; UniqSet BlockId
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021936"><span class="hs-identifier hs-var">blocksSeen'</span></a></span><span>
</span><span id="line-794"></span><span>           </span><span class="hs-keyword">in</span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; [BlockId]
forall elt. UniqSet elt -&gt; [elt]
</span><a href="GHC.Types.Unique.Set.html#nonDetEltsUniqSet"><span class="hs-identifier hs-var">nonDetEltsUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021935"><span class="hs-identifier hs-var">badDests</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-795"></span><span>                 </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-796"></span><span>                 </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
-&gt; [SCC (GenBasicBlock (LiveInstr instr))] -&gt; Maybe BlockId
</span><a href="#local-6989586621681021947"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021936"><span class="hs-identifier hs-var">blocksSeen'</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (GenBasicBlock (LiveInstr instr))]
</span><a href="#local-6989586621681021939"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-797"></span><span>                 </span><span id="local-6989586621681021933"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021933"><span class="hs-identifier hs-var">bad</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; Maybe BlockId
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021933"><span class="hs-identifier hs-var">bad</span></a></span><span>
</span><span id="line-798"></span><span>
</span><span id="line-799"></span><span>        </span><span class="annot"><a href="#local-6989586621681021947"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621681021932"><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021932"><span class="hs-identifier hs-var">blocksSeen</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-type">CyclicSCC</span></a></span><span> </span><span id="local-6989586621681021931"><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681021931"><span class="hs-identifier hs-var">blocks</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681021930"><span class="annot"><span class="annottext">[SCC (GenBasicBlock (LiveInstr instr))]
</span><a href="#local-6989586621681021930"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-800"></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span id="local-6989586621681021929"><span class="annot"><span class="annottext">dests :: UniqSet BlockId
</span><a href="#local-6989586621681021929"><span class="hs-identifier hs-var hs-var">dests</span></a></span></span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UniqSet BlockId] -&gt; UniqSet BlockId
forall a. [UniqSet a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionManyUniqSets"><span class="hs-identifier hs-var">unionManyUniqSets</span></a></span><span> </span><span class="annot"><span class="annottext">([UniqSet BlockId] -&gt; UniqSet BlockId)
-&gt; [UniqSet BlockId] -&gt; UniqSet BlockId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock (LiveInstr instr) -&gt; UniqSet BlockId)
-&gt; [GenBasicBlock (LiveInstr instr)] -&gt; [UniqSet BlockId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr) -&gt; UniqSet BlockId
forall {instr}.
Instruction instr =&gt;
GenBasicBlock (LiveInstr instr) -&gt; UniqSet BlockId
</span><a href="#local-6989586621681021937"><span class="hs-identifier hs-var">slurpJumpDestsOfBlock</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681021931"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-801"></span><span>                </span><span id="local-6989586621681021927"><span class="annot"><span class="annottext">blocksSeen' :: UniqSet BlockId
</span><a href="#local-6989586621681021927"><span class="hs-identifier hs-var hs-var">blocksSeen'</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; UniqSet BlockId -&gt; UniqSet BlockId
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-identifier hs-var">unionUniqSets</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021932"><span class="hs-identifier hs-var">blocksSeen</span></a></span><span> </span><span class="annot"><span class="annottext">(UniqSet BlockId -&gt; UniqSet BlockId)
-&gt; UniqSet BlockId -&gt; UniqSet BlockId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; UniqSet BlockId
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">([BlockId] -&gt; UniqSet BlockId) -&gt; [BlockId] -&gt; UniqSet BlockId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(GenBasicBlock (LiveInstr instr) -&gt; BlockId)
-&gt; [GenBasicBlock (LiveInstr instr)] -&gt; [BlockId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr) -&gt; BlockId
forall i. GenBasicBlock i -&gt; BlockId
</span><a href="GHC.Cmm.html#blockId"><span class="hs-identifier hs-var">blockId</span></a></span><span> </span><span class="annot"><span class="annottext">[GenBasicBlock (LiveInstr instr)]
</span><a href="#local-6989586621681021931"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-802"></span><span>                </span><span id="local-6989586621681021926"><span class="annot"><span class="annottext">badDests :: UniqSet BlockId
</span><a href="#local-6989586621681021926"><span class="hs-identifier hs-var hs-var">badDests</span></a></span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021929"><span class="hs-identifier hs-var">dests</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; UniqSet BlockId -&gt; UniqSet BlockId
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021927"><span class="hs-identifier hs-var">blocksSeen'</span></a></span><span>
</span><span id="line-803"></span><span>           </span><span class="hs-keyword">in</span><span>   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId -&gt; [BlockId]
forall elt. UniqSet elt -&gt; [elt]
</span><a href="GHC.Types.Unique.Set.html#nonDetEltsUniqSet"><span class="hs-identifier hs-var">nonDetEltsUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021926"><span class="hs-identifier hs-var">badDests</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-804"></span><span>                 </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-805"></span><span>                 </span><span class="hs-special">[</span><span class="hs-special">]</span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
-&gt; [SCC (GenBasicBlock (LiveInstr instr))] -&gt; Maybe BlockId
</span><a href="#local-6989586621681021947"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet BlockId
</span><a href="#local-6989586621681021927"><span class="hs-identifier hs-var">blocksSeen'</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (GenBasicBlock (LiveInstr instr))]
</span><a href="#local-6989586621681021930"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-806"></span><span>                 </span><span id="local-6989586621681021925"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021925"><span class="hs-identifier hs-var">bad</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; Maybe BlockId
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021925"><span class="hs-identifier hs-var">bad</span></a></span><span>
</span><span id="line-807"></span><span>
</span><span id="line-808"></span><span>        </span><span id="local-6989586621681021937"><span class="annot"><span class="annottext">slurpJumpDestsOfBlock :: GenBasicBlock (LiveInstr instr) -&gt; UniqSet BlockId
</span><a href="#local-6989586621681021937"><span class="hs-identifier hs-var hs-var">slurpJumpDestsOfBlock</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681021920"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021920"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-809"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[UniqSet BlockId] -&gt; UniqSet BlockId
forall a. [UniqSet a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionManyUniqSets"><span class="hs-identifier hs-var">unionManyUniqSets</span></a></span><span>
</span><span id="line-810"></span><span>                </span><span class="annot"><span class="annottext">([UniqSet BlockId] -&gt; UniqSet BlockId)
-&gt; [UniqSet BlockId] -&gt; UniqSet BlockId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(InstrSR instr -&gt; UniqSet BlockId)
-&gt; [InstrSR instr] -&gt; [UniqSet BlockId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[BlockId] -&gt; UniqSet BlockId
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">([BlockId] -&gt; UniqSet BlockId)
-&gt; (InstrSR instr -&gt; [BlockId]) -&gt; InstrSR instr -&gt; UniqSet BlockId
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; [BlockId]
forall instr. Instruction instr =&gt; instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#jumpDestsOfInstr"><span class="hs-identifier hs-var">jumpDestsOfInstr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-811"></span><span>                        </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021919"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681021919"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021919"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021920"><span class="hs-identifier hs-var">instrs</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-812"></span><span>
</span><span id="line-813"></span><span>
</span><span id="line-814"></span><span class="hs-comment">-- | If we've compute liveness info for this code already we have to reverse</span><span>
</span><span id="line-815"></span><span class="hs-comment">--   the SCCs in each top to get them back to the right order so we can do it again.</span><span>
</span><span id="line-816"></span><span id="local-6989586621681022702"><span id="local-6989586621681022703"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#reverseBlocksInTops"><span class="hs-identifier hs-type">reverseBlocksInTops</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022703"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022702"><span class="hs-identifier hs-type">instr</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveCmmDecl"><span class="hs-identifier hs-type">LiveCmmDecl</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022703"><span class="hs-identifier hs-type">statics</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022702"><span class="hs-identifier hs-type">instr</span></a></span></span></span><span>
</span><span id="line-817"></span><span id="reverseBlocksInTops"><span class="annot"><span class="annottext">reverseBlocksInTops :: forall statics instr.
LiveCmmDecl statics instr -&gt; LiveCmmDecl statics instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#reverseBlocksInTops"><span class="hs-identifier hs-var hs-var">reverseBlocksInTops</span></a></span></span><span> </span><span id="local-6989586621681021918"><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681021918"><span class="hs-identifier hs-var">top</span></a></span></span><span>
</span><span id="line-818"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681021918"><span class="hs-identifier hs-var">top</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-819"></span><span>        </span><span class="annot"><a href="GHC.Cmm.html#CmmData"><span class="hs-identifier hs-type">CmmData</span></a></span><span class="hs-special">{</span><span class="hs-special">}</span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LiveCmmDecl statics instr
</span><a href="#local-6989586621681021918"><span class="hs-identifier hs-var">top</span></a></span><span>
</span><span id="line-820"></span><span>        </span><span class="annot"><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-type">CmmProc</span></a></span><span> </span><span id="local-6989586621681021917"><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681021917"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span id="local-6989586621681021916"><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681021916"><span class="hs-identifier hs-var">lbl</span></a></span></span><span> </span><span id="local-6989586621681021915"><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681021915"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span id="local-6989586621681021914"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021914"><span class="hs-identifier hs-var">sccs</span></a></span></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">LiveInfo
-&gt; CLabel
-&gt; [GlobalReg]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; LiveCmmDecl statics instr
forall d h g. h -&gt; CLabel -&gt; [GlobalReg] -&gt; g -&gt; GenCmmDecl d h g
</span><a href="GHC.Cmm.html#CmmProc"><span class="hs-identifier hs-var">CmmProc</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInfo
</span><a href="#local-6989586621681021917"><span class="hs-identifier hs-var">info</span></a></span><span> </span><span class="annot"><span class="annottext">CLabel
</span><a href="#local-6989586621681021916"><span class="hs-identifier hs-var">lbl</span></a></span><span> </span><span class="annot"><span class="annottext">[GlobalReg]
</span><a href="#local-6989586621681021915"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)] -&gt; [SCC (LiveBasicBlock instr)]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021914"><span class="hs-identifier hs-var">sccs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-821"></span><span>
</span><span id="line-822"></span><span>
</span><span id="line-823"></span><span class="hs-comment">-- | Computing liveness</span><span>
</span><span id="line-824"></span><span class="hs-comment">--</span><span>
</span><span id="line-825"></span><span class="hs-comment">--  On entry, the SCCs must be in &quot;reverse&quot; order: later blocks may transfer</span><span>
</span><span id="line-826"></span><span class="hs-comment">--  control to earlier ones only, else `panic`.</span><span>
</span><span id="line-827"></span><span class="hs-comment">--</span><span>
</span><span id="line-828"></span><span class="hs-comment">--  The SCCs returned are in the *opposite* order, which is exactly what we</span><span>
</span><span id="line-829"></span><span class="hs-comment">--  want for the next pass.</span><span>
</span><span id="line-830"></span><span class="hs-comment">--</span><span>
</span><span id="line-831"></span><span id="local-6989586621681022710"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#computeLiveness"><span class="hs-identifier hs-type">computeLiveness</span></a></span><span>
</span><span id="line-832"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Utils.Outputable.html#Outputable"><span class="hs-identifier hs-type">Outputable</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022710"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022710"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-833"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-834"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022710"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-835"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022710"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span class="hs-special">,</span><span>       </span><span class="hs-comment">-- instructions annotated with list of registers</span><span>
</span><span id="line-836"></span><span>                                                </span><span class="hs-comment">-- which are &quot;dead after this instruction&quot;.</span><span>
</span><span id="line-837"></span><span>               </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">)</span></span><span>                 </span><span class="hs-comment">-- blocks annotated with set of live registers</span><span>
</span><span id="line-838"></span><span>                                                </span><span class="hs-comment">-- on entry to the block.</span><span>
</span><span id="line-839"></span><span>
</span><span id="line-840"></span><span id="computeLiveness"><span class="annot"><span class="annottext">computeLiveness :: forall instr.
(Outputable instr, Instruction instr) =&gt;
Platform
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#computeLiveness"><span class="hs-identifier hs-var hs-var">computeLiveness</span></a></span></span><span> </span><span id="local-6989586621681021901"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021901"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021900"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021900"><span class="hs-identifier hs-var">sccs</span></a></span></span><span>
</span><span id="line-841"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)] -&gt; Maybe BlockId
forall instr.
Instruction instr =&gt;
[SCC (LiveBasicBlock instr)] -&gt; Maybe BlockId
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#checkIsReverseDependent"><span class="hs-identifier hs-var">checkIsReverseDependent</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021900"><span class="hs-identifier hs-var">sccs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-842"></span><span>        </span><span class="annot"><span class="annottext">Maybe BlockId
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-var">livenessSCCs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021901"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
forall (map :: * -&gt; *) a. IsMap map =&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapEmpty"><span class="hs-identifier hs-var">mapEmpty</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021900"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-843"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681021898"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021898"><span class="hs-identifier hs-var">bad</span></a></span></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc -&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
forall a. HasCallStack =&gt; [Char] -&gt; SDoc -&gt; a
</span><a href="GHC.Utils.Outputable.html#pprPanic"><span class="hs-identifier hs-var">pprPanic</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;RegAlloc.Liveness.computeLiveness&quot;</span></span><span>
</span><span id="line-844"></span><span>                                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SDoc] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>   </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;SCCs aren't in reverse dependent order&quot;</span></span><span>
</span><span id="line-845"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;bad blockId&quot;</span></span><span> </span><span class="annot"><span class="annottext">SDoc -&gt; SDoc -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021898"><span class="hs-identifier hs-var">bad</span></a></span><span>
</span><span id="line-846"></span><span>                                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)] -&gt; SDoc
forall a. Outputable a =&gt; a -&gt; SDoc
</span><a href="GHC.Utils.Outputable.html#ppr"><span class="hs-identifier hs-var">ppr</span></a></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021900"><span class="hs-identifier hs-var">sccs</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-847"></span><span>
</span><span id="line-848"></span><span id="local-6989586621681022698"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-type">livenessSCCs</span></a></span><span>
</span><span id="line-849"></span><span>       </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022698"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-850"></span><span>       </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-851"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>
</span><span id="line-852"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022698"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>          </span><span class="hs-comment">-- accum</span><span>
</span><span id="line-853"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022698"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-854"></span><span>       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../containers/src/Data.Graph.html#SCC"><span class="hs-identifier hs-type">SCC</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022698"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-855"></span><span>          </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-856"></span><span>
</span><span id="line-857"></span><span id="livenessSCCs"><span class="annot"><span class="annottext">livenessSCCs :: forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-var hs-var">livenessSCCs</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681021884"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021884"><span class="hs-identifier hs-var">blockmap</span></a></span></span><span> </span><span id="local-6989586621681021883"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021883"><span class="hs-identifier hs-var">done</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-858"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021883"><span class="hs-identifier hs-var">done</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021884"><span class="hs-identifier hs-var">blockmap</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-859"></span><span>
</span><span id="line-860"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-var">livenessSCCs</span></a></span><span> </span><span id="local-6989586621681021882"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021882"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021881"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021881"><span class="hs-identifier hs-var">blockmap</span></a></span></span><span> </span><span id="local-6989586621681021880"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021880"><span class="hs-identifier hs-var">done</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-type">AcyclicSCC</span></a></span><span> </span><span id="local-6989586621681021879"><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681021879"><span class="hs-identifier hs-var">block</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681021878"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021878"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-861"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681021877"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021877"><span class="hs-identifier hs-var">blockmap'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681021876"><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681021876"><span class="hs-identifier hs-var">block'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; BlockMap RegSet
-&gt; LiveBasicBlock instr
-&gt; (BlockMap RegSet, LiveBasicBlock instr)
forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; LiveBasicBlock instr
-&gt; (BlockMap RegSet, LiveBasicBlock instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBlock"><span class="hs-identifier hs-var">livenessBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021882"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021881"><span class="hs-identifier hs-var">blockmap</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681021879"><span class="hs-identifier hs-var">block</span></a></span><span>
</span><span id="line-862"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="annot"><span class="annottext">Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-var">livenessSCCs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021882"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021877"><span class="hs-identifier hs-var">blockmap'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LiveBasicBlock instr -&gt; SCC (LiveBasicBlock instr)
forall vertex. vertex -&gt; SCC vertex
</span><a href="../../containers/src/Data.Graph.html#AcyclicSCC"><span class="hs-identifier hs-var">AcyclicSCC</span></a></span><span> </span><span class="annot"><span class="annottext">LiveBasicBlock instr
</span><a href="#local-6989586621681021876"><span class="hs-identifier hs-var">block'</span></a></span><span> </span><span class="annot"><span class="annottext">SCC (LiveBasicBlock instr)
-&gt; [SCC (LiveBasicBlock instr)] -&gt; [SCC (LiveBasicBlock instr)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021880"><span class="hs-identifier hs-var">done</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021878"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-863"></span><span>
</span><span id="line-864"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-var">livenessSCCs</span></a></span><span> </span><span id="local-6989586621681021874"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021874"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021873"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021873"><span class="hs-identifier hs-var">blockmap</span></a></span></span><span> </span><span id="local-6989586621681021872"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021872"><span class="hs-identifier hs-var">done</span></a></span></span><span>
</span><span id="line-865"></span><span>        </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-type">CyclicSCC</span></a></span><span> </span><span id="local-6989586621681021871"><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681021871"><span class="hs-identifier hs-var">blocks</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681021870"><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021870"><span class="hs-identifier hs-var">sccs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-866"></span><span>        </span><span class="annot"><span class="annottext">Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; [SCC (LiveBasicBlock instr)]
-&gt; ([SCC (LiveBasicBlock instr)], BlockMap RegSet)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessSCCs"><span class="hs-identifier hs-var">livenessSCCs</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021874"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021869"><span class="hs-identifier hs-var">blockmap'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LiveBasicBlock instr] -&gt; SCC (LiveBasicBlock instr)
forall vertex. [vertex] -&gt; SCC vertex
</span><a href="../../containers/src/Data.Graph.html#CyclicSCC"><span class="hs-identifier hs-var">CyclicSCC</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681021868"><span class="hs-identifier hs-var">blocks'</span></a></span><span class="annot"><span class="annottext">SCC (LiveBasicBlock instr)
-&gt; [SCC (LiveBasicBlock instr)] -&gt; [SCC (LiveBasicBlock instr)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021872"><span class="hs-identifier hs-var">done</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[SCC (LiveBasicBlock instr)]
</span><a href="#local-6989586621681021870"><span class="hs-identifier hs-var">sccs</span></a></span><span>
</span><span id="line-867"></span><span> </span><span class="hs-keyword">where</span><span>      </span><span class="hs-special">(</span><span id="local-6989586621681021869"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021869"><span class="hs-identifier hs-var">blockmap'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681021868"><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681021868"><span class="hs-identifier hs-var">blocks'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-868"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockMap RegSet
 -&gt; [LiveBasicBlock instr]
 -&gt; (BlockMap RegSet, [LiveBasicBlock instr]))
-&gt; (BlockMap RegSet -&gt; BlockMap RegSet -&gt; Bool)
-&gt; BlockMap RegSet
-&gt; [LiveBasicBlock instr]
-&gt; (BlockMap RegSet, [LiveBasicBlock instr])
forall a b c.
(a -&gt; b -&gt; (a, c)) -&gt; (a -&gt; a -&gt; Bool) -&gt; a -&gt; b -&gt; (a, c)
</span><a href="#local-6989586621681021867"><span class="hs-identifier hs-var">iterateUntilUnchanged</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
-&gt; [LiveBasicBlock instr]
-&gt; (BlockMap RegSet, [LiveBasicBlock instr])
forall instr.
Instruction instr =&gt;
BlockMap RegSet
-&gt; [LiveBasicBlock instr]
-&gt; (BlockMap RegSet, [LiveBasicBlock instr])
</span><a href="#local-6989586621681021866"><span class="hs-identifier hs-var">linearLiveness</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet -&gt; BlockMap RegSet -&gt; Bool
forall {map :: * -&gt; *} {map :: * -&gt; *} {elt}.
(IsMap map, IsMap map, Eq (KeyOf map), Eq elt,
 KeyOf map ~ KeyOf map) =&gt;
map (UniqSet elt) -&gt; map (UniqSet elt) -&gt; Bool
</span><a href="#local-6989586621681021865"><span class="hs-identifier hs-var">equalBlockMaps</span></a></span><span>
</span><span id="line-869"></span><span>                                      </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021873"><span class="hs-identifier hs-var">blockmap</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveBasicBlock instr]
</span><a href="#local-6989586621681021871"><span class="hs-identifier hs-var">blocks</span></a></span><span>
</span><span id="line-870"></span><span>
</span><span id="line-871"></span><span>            </span><span id="local-6989586621681022693"><span id="local-6989586621681022694"><span id="local-6989586621681022695"><span class="annot"><a href="#local-6989586621681021867"><span class="hs-identifier hs-type">iterateUntilUnchanged</span></a></span><span>
</span><span id="line-872"></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681022695"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022694"><span class="hs-identifier hs-type">b</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681022695"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621681022693"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681022695"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022695"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">)</span><span>
</span><span id="line-873"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022695"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621681022694"><span class="hs-identifier hs-type">b</span></a></span><span>
</span><span id="line-874"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621681022695"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621681022693"><span class="hs-identifier hs-type">c</span></a></span><span class="hs-special">)</span></span></span></span><span>
</span><span id="line-875"></span><span>
</span><span id="line-876"></span><span>            </span><span id="local-6989586621681021867"><span class="annot"><span class="annottext">iterateUntilUnchanged :: forall a b c.
(a -&gt; b -&gt; (a, c)) -&gt; (a -&gt; a -&gt; Bool) -&gt; a -&gt; b -&gt; (a, c)
</span><a href="#local-6989586621681021867"><span class="hs-identifier hs-var hs-var">iterateUntilUnchanged</span></a></span></span><span> </span><span id="local-6989586621681021863"><span class="annot"><span class="annottext">a -&gt; b -&gt; (a, c)
</span><a href="#local-6989586621681021863"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span id="local-6989586621681021862"><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621681021862"><span class="hs-identifier hs-var">eq</span></a></span></span><span> </span><span id="local-6989586621681021861"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021861"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621681021860"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681021860"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-877"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(a, c)] -&gt; (a, c)
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span> </span><span class="annot"><span class="annottext">([(a, c)] -&gt; (a, c)) -&gt; [(a, c)] -&gt; (a, c)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-878"></span><span>                  </span><span class="annot"><span class="annottext">([(a, c)] -&gt; [(a, c)]) -&gt; [[(a, c)]] -&gt; [(a, c)]
forall (t :: * -&gt; *) a b. Foldable t =&gt; (a -&gt; [b]) -&gt; t a -&gt; [b]
</span><a href="../../base/src/Data.Foldable.html#concatMap"><span class="hs-identifier hs-var">concatMap</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, c)] -&gt; [(a, c)]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#tail"><span class="hs-identifier hs-var">tail</span></a></span><span> </span><span class="annot"><span class="annottext">([[(a, c)]] -&gt; [(a, c)]) -&gt; [[(a, c)]] -&gt; [(a, c)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-879"></span><span>                  </span><span class="annot"><span class="annottext">((a, c) -&gt; (a, c) -&gt; Bool) -&gt; [(a, c)] -&gt; [[(a, c)]]
forall a. (a -&gt; a -&gt; Bool) -&gt; [a] -&gt; [[a]]
</span><a href="../../base/src/Data.OldList.html#groupBy"><span class="hs-identifier hs-var">groupBy</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681021856"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021856"><span class="hs-identifier hs-var">a1</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681021855"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021855"><span class="hs-identifier hs-var">a2</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; Bool
</span><a href="#local-6989586621681021862"><span class="hs-identifier hs-var">eq</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021856"><span class="hs-identifier hs-var">a1</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021855"><span class="hs-identifier hs-var">a2</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([(a, c)] -&gt; [[(a, c)]]) -&gt; [(a, c)] -&gt; [[(a, c)]]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-880"></span><span>                  </span><span class="annot"><span class="annottext">((a, c) -&gt; (a, c)) -&gt; (a, c) -&gt; [(a, c)]
forall a. (a -&gt; a) -&gt; a -&gt; [a]
</span><a href="../../base/src/GHC.List.html#iterate"><span class="hs-identifier hs-var">iterate</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681021853"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021853"><span class="hs-identifier hs-var">a</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">c
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">a -&gt; b -&gt; (a, c)
</span><a href="#local-6989586621681021863"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021853"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621681021860"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">((a, c) -&gt; [(a, c)]) -&gt; (a, c) -&gt; [(a, c)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-881"></span><span>                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021861"><span class="hs-identifier hs-var">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[Char] -&gt; c
forall a. [Char] -&gt; a
</span><a href="GHC.Utils.Panic.Plain.html#panic"><span class="hs-identifier hs-var">panic</span></a></span><span> </span><span class="annot"><span class="annottext">[Char]
</span><span class="hs-string">&quot;RegLiveness.livenessSCCs&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-882"></span><span>
</span><span id="line-883"></span><span>
</span><span id="line-884"></span><span>            </span><span id="local-6989586621681022692"><span class="annot"><a href="#local-6989586621681021866"><span class="hs-identifier hs-type">linearLiveness</span></a></span><span>
</span><span id="line-885"></span><span>                </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022692"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-886"></span><span>                </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022692"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-887"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022692"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-888"></span><span>
</span><span id="line-889"></span><span>            </span><span id="local-6989586621681021866"><span class="annot"><span class="annottext">linearLiveness :: forall instr.
Instruction instr =&gt;
BlockMap RegSet
-&gt; [LiveBasicBlock instr]
-&gt; (BlockMap RegSet, [LiveBasicBlock instr])
</span><a href="#local-6989586621681021866"><span class="hs-identifier hs-var hs-var">linearLiveness</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(BlockMap RegSet
 -&gt; LiveBasicBlock instr -&gt; (BlockMap RegSet, LiveBasicBlock instr))
-&gt; BlockMap RegSet
-&gt; [LiveBasicBlock instr]
-&gt; (BlockMap RegSet, [LiveBasicBlock instr])
forall (t :: * -&gt; *) s a b.
Traversable t =&gt;
(s -&gt; a -&gt; (s, b)) -&gt; s -&gt; t a -&gt; (s, t b)
</span><a href="../../base/src/Data.Traversable.html#mapAccumL"><span class="hs-identifier hs-var">mapAccumL</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform
-&gt; BlockMap RegSet
-&gt; LiveBasicBlock instr
-&gt; (BlockMap RegSet, LiveBasicBlock instr)
forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; LiveBasicBlock instr
-&gt; (BlockMap RegSet, LiveBasicBlock instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBlock"><span class="hs-identifier hs-var">livenessBlock</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021874"><span class="hs-identifier hs-var">platform</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-890"></span><span>
</span><span id="line-891"></span><span>                </span><span class="hs-comment">-- probably the least efficient way to compare two</span><span>
</span><span id="line-892"></span><span>                </span><span class="hs-comment">-- BlockMaps for equality.</span><span>
</span><span id="line-893"></span><span>            </span><span id="local-6989586621681021865"><span class="annot"><span class="annottext">equalBlockMaps :: map (UniqSet elt) -&gt; map (UniqSet elt) -&gt; Bool
</span><a href="#local-6989586621681021865"><span class="hs-identifier hs-var hs-var">equalBlockMaps</span></a></span></span><span> </span><span id="local-6989586621681021828"><span class="annot"><span class="annottext">map (UniqSet elt)
</span><a href="#local-6989586621681021828"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621681021827"><span class="annot"><span class="annottext">map (UniqSet elt)
</span><a href="#local-6989586621681021827"><span class="hs-identifier hs-var">b</span></a></span></span><span>
</span><span id="line-894"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[(KeyOf map, [elt])]
</span><a href="#local-6989586621681021826"><span class="hs-identifier hs-var">a'</span></a></span><span> </span><span class="annot"><span class="annottext">[(KeyOf map, [elt])] -&gt; [(KeyOf map, [elt])] -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">[(KeyOf map, [elt])]
</span><a href="#local-6989586621681021825"><span class="hs-identifier hs-var">b'</span></a></span><span>
</span><span id="line-895"></span><span>              </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621681021826"><span class="annot"><span class="annottext">a' :: [(KeyOf map, [elt])]
</span><a href="#local-6989586621681021826"><span class="hs-identifier hs-var hs-var">a'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((KeyOf map, UniqSet elt) -&gt; (KeyOf map, [elt]))
-&gt; [(KeyOf map, UniqSet elt)] -&gt; [(KeyOf map, [elt])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyOf map, UniqSet elt) -&gt; (KeyOf map, [elt])
forall {a} {elt}. (a, UniqSet elt) -&gt; (a, [elt])
</span><a href="#local-6989586621681021824"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">([(KeyOf map, UniqSet elt)] -&gt; [(KeyOf map, [elt])])
-&gt; [(KeyOf map, UniqSet elt)] -&gt; [(KeyOf map, [elt])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">map (UniqSet elt) -&gt; [(KeyOf map, UniqSet elt)]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; [(KeyOf map, a)]
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapToList"><span class="hs-identifier hs-var">mapToList</span></a></span><span> </span><span class="annot"><span class="annottext">map (UniqSet elt)
</span><a href="#local-6989586621681021828"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-896"></span><span>                    </span><span id="local-6989586621681021825"><span class="annot"><span class="annottext">b' :: [(KeyOf map, [elt])]
</span><a href="#local-6989586621681021825"><span class="hs-identifier hs-var hs-var">b'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((KeyOf map, UniqSet elt) -&gt; (KeyOf map, [elt]))
-&gt; [(KeyOf map, UniqSet elt)] -&gt; [(KeyOf map, [elt])]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">(KeyOf map, UniqSet elt) -&gt; (KeyOf map, [elt])
forall {a} {elt}. (a, UniqSet elt) -&gt; (a, [elt])
</span><a href="#local-6989586621681021824"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">([(KeyOf map, UniqSet elt)] -&gt; [(KeyOf map, [elt])])
-&gt; [(KeyOf map, UniqSet elt)] -&gt; [(KeyOf map, [elt])]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">map (UniqSet elt) -&gt; [(KeyOf map, UniqSet elt)]
forall (map :: * -&gt; *) a. IsMap map =&gt; map a -&gt; [(KeyOf map, a)]
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapToList"><span class="hs-identifier hs-var">mapToList</span></a></span><span> </span><span class="annot"><span class="annottext">map (UniqSet elt)
</span><a href="#local-6989586621681021827"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-897"></span><span>                    </span><span id="local-6989586621681021824"><span class="annot"><span class="annottext">f :: (a, UniqSet elt) -&gt; (a, [elt])
</span><a href="#local-6989586621681021824"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681021822"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021822"><span class="hs-identifier hs-var">key</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681021821"><span class="annot"><span class="annottext">UniqSet elt
</span><a href="#local-6989586621681021821"><span class="hs-identifier hs-var">elt</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621681021822"><span class="hs-identifier hs-var">key</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UniqSet elt -&gt; [elt]
forall elt. UniqSet elt -&gt; [elt]
</span><a href="GHC.Types.Unique.Set.html#nonDetEltsUniqSet"><span class="hs-identifier hs-var">nonDetEltsUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">UniqSet elt
</span><a href="#local-6989586621681021821"><span class="hs-identifier hs-var">elt</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-898"></span><span>                    </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-899"></span><span>
</span><span id="line-900"></span><span>
</span><span id="line-901"></span><span>
</span><span id="line-902"></span><span class="hs-comment">-- | Annotate a basic block with register liveness information.</span><span>
</span><span id="line-903"></span><span class="hs-comment">--</span><span>
</span><span id="line-904"></span><span id="local-6989586621681022696"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBlock"><span class="hs-identifier hs-type">livenessBlock</span></a></span><span>
</span><span id="line-905"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022696"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-906"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-907"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>
</span><span id="line-908"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022696"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-909"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveBasicBlock"><span class="hs-identifier hs-type">LiveBasicBlock</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022696"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-910"></span><span>
</span><span id="line-911"></span><span id="livenessBlock"><span class="annot"><span class="annottext">livenessBlock :: forall instr.
Instruction instr =&gt;
Platform
-&gt; BlockMap RegSet
-&gt; LiveBasicBlock instr
-&gt; (BlockMap RegSet, LiveBasicBlock instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBlock"><span class="hs-identifier hs-var hs-var">livenessBlock</span></a></span></span><span> </span><span id="local-6989586621681021816"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021816"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021815"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021815"><span class="hs-identifier hs-var">blockmap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-type">BasicBlock</span></a></span><span> </span><span id="local-6989586621681021814"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021814"><span class="hs-identifier hs-var">block_id</span></a></span></span><span> </span><span id="local-6989586621681021813"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021813"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-912"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-913"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681021812"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021812"><span class="hs-identifier hs-var">regsLiveOnEntry</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681021811"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021811"><span class="hs-identifier hs-var">instrs1</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-914"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; [LiveInstr instr]
-&gt; [LiveInstr instr]
-&gt; (RegSet, [LiveInstr instr])
forall instr.
Instruction instr =&gt;
Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; [LiveInstr instr]
-&gt; [LiveInstr instr]
-&gt; (RegSet, [LiveInstr instr])
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBack"><span class="hs-identifier hs-var">livenessBack</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021816"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021815"><span class="hs-identifier hs-var">blockmap</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[LiveInstr instr] -&gt; [LiveInstr instr]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021813"><span class="hs-identifier hs-var">instrs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-915"></span><span>        </span><span id="local-6989586621681021809"><span class="annot"><span class="annottext">blockmap' :: BlockMap RegSet
</span><a href="#local-6989586621681021809"><span class="hs-identifier hs-var hs-var">blockmap'</span></a></span></span><span>       </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; RegSet -&gt; BlockMap RegSet -&gt; BlockMap RegSet
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; a -&gt; map a -&gt; map a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapInsert"><span class="hs-identifier hs-var">mapInsert</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681021814"><span class="hs-identifier hs-var">block_id</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021812"><span class="hs-identifier hs-var">regsLiveOnEntry</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021815"><span class="hs-identifier hs-var">blockmap</span></a></span><span>
</span><span id="line-916"></span><span>
</span><span id="line-917"></span><span>        </span><span id="local-6989586621681021807"><span class="annot"><span class="annottext">instrs2 :: [LiveInstr instr]
</span><a href="#local-6989586621681021807"><span class="hs-identifier hs-var hs-var">instrs2</span></a></span></span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall instr.
Instruction instr =&gt;
Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessForward"><span class="hs-identifier hs-var">livenessForward</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021816"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021812"><span class="hs-identifier hs-var">regsLiveOnEntry</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021811"><span class="hs-identifier hs-var">instrs1</span></a></span><span>
</span><span id="line-918"></span><span>
</span><span id="line-919"></span><span>        </span><span id="local-6989586621681021805"><span class="annot"><span class="annottext">output :: GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681021805"><span class="hs-identifier hs-var hs-var">output</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; [LiveInstr instr] -&gt; GenBasicBlock (LiveInstr instr)
forall i. BlockId -&gt; [i] -&gt; GenBasicBlock i
</span><a href="GHC.Cmm.html#BasicBlock"><span class="hs-identifier hs-var">BasicBlock</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021814"><span class="hs-identifier hs-var">block_id</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021807"><span class="hs-identifier hs-var">instrs2</span></a></span><span>
</span><span id="line-920"></span><span>
</span><span id="line-921"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="hs-special">(</span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021809"><span class="hs-identifier hs-var">blockmap'</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">GenBasicBlock (LiveInstr instr)
</span><a href="#local-6989586621681021805"><span class="hs-identifier hs-var">output</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-922"></span><span>
</span><span id="line-923"></span><span class="hs-comment">-- | Calculate liveness going forwards,</span><span>
</span><span id="line-924"></span><span class="hs-comment">--   filling in when regs are born</span><span>
</span><span id="line-925"></span><span>
</span><span id="line-926"></span><span id="local-6989586621681022668"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessForward"><span class="hs-identifier hs-type">livenessForward</span></a></span><span>
</span><span id="line-927"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022668"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-928"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-929"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>                       </span><span class="hs-comment">-- regs live on this instr</span><span>
</span><span id="line-930"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022668"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022668"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-931"></span><span>
</span><span id="line-932"></span><span id="livenessForward"><span class="annot"><span class="annottext">livenessForward :: forall instr.
Instruction instr =&gt;
Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessForward"><span class="hs-identifier hs-var hs-var">livenessForward</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span>        </span><span class="annot"><span class="annottext">RegSet
</span><span class="hs-identifier">_</span></span><span>           </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-933"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessForward"><span class="hs-identifier hs-var">livenessForward</span></a></span><span> </span><span id="local-6989586621681021798"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021798"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021797"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021797"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681021796"><span class="annot"><span class="annottext">li :: LiveInstr instr
</span><a href="#local-6989586621681021796"><span class="hs-identifier hs-var">li</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681021795"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021795"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span id="local-6989586621681021794"><span class="annot"><span class="annottext">Maybe Liveness
</span><a href="#local-6989586621681021794"><span class="hs-identifier hs-var">mLive</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681021793"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021793"><span class="hs-identifier hs-var">lis</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-934"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681021792"><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681021792"><span class="hs-identifier hs-var">live</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><a href="#local-6989586621681021794"><span class="hs-identifier hs-var">mLive</span></a></span><span>
</span><span id="line-935"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>
</span><span id="line-936"></span><span>                </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#RU"><span class="hs-identifier hs-type">RU</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681021791"><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021791"><span class="hs-identifier hs-var">written</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; InstrSR instr -&gt; RegUsage
forall instr. Instruction instr =&gt; Platform -&gt; instr -&gt; RegUsage
</span><a href="GHC.CmmToAsm.Instr.html#regUsageOfInstr"><span class="hs-identifier hs-var">regUsageOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021798"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021795"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-937"></span><span>                </span><span class="hs-comment">-- Regs that are written to but weren't live on entry to this instruction</span><span>
</span><span id="line-938"></span><span>                </span><span class="hs-comment">--      are recorded as being born here.</span><span>
</span><span id="line-939"></span><span>                </span><span id="local-6989586621681021790"><span class="annot"><span class="annottext">rsBorn :: RegSet
</span><a href="#local-6989586621681021790"><span class="hs-identifier hs-var hs-var">rsBorn</span></a></span></span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span>
</span><span id="line-940"></span><span>                                </span><span class="annot"><span class="annottext">([Reg] -&gt; RegSet) -&gt; [Reg] -&gt; RegSet
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Reg -&gt; Bool) -&gt; [Reg] -&gt; [Reg]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681021789"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021789"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; Bool -&gt; Bool
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; RegSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-identifier hs-var">elementOfUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021789"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021797"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021791"><span class="hs-identifier hs-var">written</span></a></span><span>
</span><span id="line-941"></span><span>
</span><span id="line-942"></span><span>                </span><span id="local-6989586621681021788"><span class="annot"><span class="annottext">rsLiveNext :: RegSet
</span><a href="#local-6989586621681021788"><span class="hs-identifier hs-var hs-var">rsLiveNext</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021797"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-operator hs-var">`unionUniqSets`</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021790"><span class="hs-identifier hs-var">rsBorn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-943"></span><span>                                        </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var hs-var">liveDieRead</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681021792"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-944"></span><span>                                        </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var hs-var">liveDieWrite</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681021792"><span class="hs-identifier hs-var">live</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-945"></span><span>
</span><span id="line-946"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021795"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; Maybe Liveness
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness
</span><a href="#local-6989586621681021792"><span class="hs-identifier hs-var">live</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">liveBorn :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var">liveBorn</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021790"><span class="hs-identifier hs-var">rsBorn</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-947"></span><span>                </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall instr.
Instruction instr =&gt;
Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessForward"><span class="hs-identifier hs-var">livenessForward</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021798"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021788"><span class="hs-identifier hs-var">rsLiveNext</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021793"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-948"></span><span>
</span><span id="line-949"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-950"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681021796"><span class="hs-identifier hs-var">li</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall instr.
Instruction instr =&gt;
Platform -&gt; RegSet -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessForward"><span class="hs-identifier hs-var">livenessForward</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021798"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021797"><span class="hs-identifier hs-var">rsLiveEntry</span></a></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021793"><span class="hs-identifier hs-var">lis</span></a></span><span>
</span><span id="line-951"></span><span>
</span><span id="line-952"></span><span>
</span><span id="line-953"></span><span class="hs-comment">-- | Calculate liveness going backwards,</span><span>
</span><span id="line-954"></span><span class="hs-comment">--   filling in when regs die, and what regs are live across each instruction</span><span>
</span><span id="line-955"></span><span>
</span><span id="line-956"></span><span id="local-6989586621681022670"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBack"><span class="hs-identifier hs-type">livenessBack</span></a></span><span>
</span><span id="line-957"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022670"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-958"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-959"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>                       </span><span class="hs-comment">-- regs live on this instr</span><span>
</span><span id="line-960"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>              </span><span class="hs-comment">-- regs live on entry to other BBs</span><span>
</span><span id="line-961"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022670"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>            </span><span class="hs-comment">-- instructions (accum)</span><span>
</span><span id="line-962"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022670"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span>            </span><span class="hs-comment">-- instructions</span><span>
</span><span id="line-963"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022670"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span></span><span>
</span><span id="line-964"></span><span>
</span><span id="line-965"></span><span id="livenessBack"><span class="annot"><span class="annottext">livenessBack :: forall instr.
Instruction instr =&gt;
Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; [LiveInstr instr]
-&gt; [LiveInstr instr]
-&gt; (RegSet, [LiveInstr instr])
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBack"><span class="hs-identifier hs-var hs-var">livenessBack</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span>        </span><span id="local-6989586621681021784"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021784"><span class="hs-identifier hs-var">liveregs</span></a></span></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><span class="hs-identifier">_</span></span><span>        </span><span id="local-6989586621681021783"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021783"><span class="hs-identifier hs-var">done</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021784"><span class="hs-identifier hs-var">liveregs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021783"><span class="hs-identifier hs-var">done</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-966"></span><span>
</span><span id="line-967"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBack"><span class="hs-identifier hs-var">livenessBack</span></a></span><span> </span><span id="local-6989586621681021782"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021782"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021781"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021781"><span class="hs-identifier hs-var">liveregs</span></a></span></span><span> </span><span id="local-6989586621681021780"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021780"><span class="hs-identifier hs-var">blockmap</span></a></span></span><span> </span><span id="local-6989586621681021779"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021779"><span class="hs-identifier hs-var">acc</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621681021778"><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681021778"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681021777"><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021777"><span class="hs-identifier hs-var">instrs</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-968"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681021776"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021776"><span class="hs-identifier hs-var">liveregs'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681021775"><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681021775"><span class="hs-identifier hs-var">instr'</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; LiveInstr instr
-&gt; (RegSet, LiveInstr instr)
forall instr.
Instruction instr =&gt;
Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; LiveInstr instr
-&gt; (RegSet, LiveInstr instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveness1"><span class="hs-identifier hs-var">liveness1</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021782"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021781"><span class="hs-identifier hs-var">liveregs</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021780"><span class="hs-identifier hs-var">blockmap</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681021778"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-969"></span><span>   </span><span class="hs-keyword">in</span><span>   </span><span class="annot"><span class="annottext">Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; [LiveInstr instr]
-&gt; [LiveInstr instr]
-&gt; (RegSet, [LiveInstr instr])
forall instr.
Instruction instr =&gt;
Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; [LiveInstr instr]
-&gt; [LiveInstr instr]
-&gt; (RegSet, [LiveInstr instr])
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#livenessBack"><span class="hs-identifier hs-var">livenessBack</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021782"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021776"><span class="hs-identifier hs-var">liveregs'</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021780"><span class="hs-identifier hs-var">blockmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LiveInstr instr
</span><a href="#local-6989586621681021775"><span class="hs-identifier hs-var">instr'</span></a></span><span> </span><span class="annot"><span class="annottext">LiveInstr instr -&gt; [LiveInstr instr] -&gt; [LiveInstr instr]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021779"><span class="hs-identifier hs-var">acc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[LiveInstr instr]
</span><a href="#local-6989586621681021777"><span class="hs-identifier hs-var">instrs</span></a></span><span>
</span><span id="line-970"></span><span>
</span><span id="line-971"></span><span>
</span><span id="line-972"></span><span class="hs-comment">-- don't bother tagging comments or deltas with liveness</span><span>
</span><span id="line-973"></span><span id="local-6989586621681022665"><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#liveness1"><span class="hs-identifier hs-type">liveness1</span></a></span><span>
</span><span id="line-974"></span><span>        </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#Instruction"><span class="hs-identifier hs-type">Instruction</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022665"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-975"></span><span>        </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#Platform"><span class="hs-identifier hs-type">Platform</span></a></span><span>
</span><span id="line-976"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>
</span><span id="line-977"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#BlockMap"><span class="hs-identifier hs-type">BlockMap</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span>
</span><span id="line-978"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022665"><span class="hs-identifier hs-type">instr</span></a></span><span>
</span><span id="line-979"></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#RegSet"><span class="hs-identifier hs-type">RegSet</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span class="annot"><a href="#local-6989586621681022665"><span class="hs-identifier hs-type">instr</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-980"></span><span>
</span><span id="line-981"></span><span id="liveness1"><span class="annot"><span class="annottext">liveness1 :: forall instr.
Instruction instr =&gt;
Platform
-&gt; RegSet
-&gt; BlockMap RegSet
-&gt; LiveInstr instr
-&gt; (RegSet, LiveInstr instr)
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveness1"><span class="hs-identifier hs-var hs-var">liveness1</span></a></span></span><span> </span><span class="annot"><span class="annottext">Platform
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621681021756"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021756"><span class="hs-identifier hs-var">liveregs</span></a></span></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681021755"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021755"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-982"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Bool
forall instr. Instruction instr =&gt; instr -&gt; Bool
</span><a href="GHC.CmmToAsm.Instr.html#isMetaInstr"><span class="hs-identifier hs-var">isMetaInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021755"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-983"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021756"><span class="hs-identifier hs-var">liveregs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021755"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-984"></span><span>
</span><span id="line-985"></span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#liveness1"><span class="hs-identifier hs-var">liveness1</span></a></span><span> </span><span id="local-6989586621681021754"><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021754"><span class="hs-identifier hs-var">platform</span></a></span></span><span> </span><span id="local-6989586621681021753"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021753"><span class="hs-identifier hs-var">liveregs</span></a></span></span><span> </span><span id="local-6989586621681021752"><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021752"><span class="hs-identifier hs-var">blockmap</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-type">LiveInstr</span></a></span><span> </span><span id="local-6989586621681021751"><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021751"><span class="hs-identifier hs-var">instr</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Liveness
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>
</span><span id="line-986"></span><span>
</span><span id="line-987"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621681021750"><span class="hs-identifier hs-var">not_a_branch</span></a></span><span>
</span><span id="line-988"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021749"><span class="hs-identifier hs-var">liveregs1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021751"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-989"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; Maybe Liveness
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Liveness -&gt; Maybe Liveness) -&gt; Liveness -&gt; Maybe Liveness
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness :: RegSet -&gt; RegSet -&gt; RegSet -&gt; Liveness
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Liveness"><span class="hs-identifier hs-type">Liveness</span></a></span><span>
</span><span id="line-990"></span><span>                        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">liveBorn :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var">liveBorn</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span>
</span><span id="line-991"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">liveDieRead :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var">liveDieRead</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021748"><span class="hs-identifier hs-var">r_dying</span></a></span><span>
</span><span id="line-992"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">liveDieWrite :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var">liveDieWrite</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021747"><span class="hs-identifier hs-var">w_dying</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-993"></span><span>
</span><span id="line-994"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-995"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021746"><span class="hs-identifier hs-var">liveregs_br</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
forall instr. InstrSR instr -&gt; Maybe Liveness -&gt; LiveInstr instr
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#LiveInstr"><span class="hs-identifier hs-var">LiveInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021751"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-996"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Liveness -&gt; Maybe Liveness
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">(Liveness -&gt; Maybe Liveness) -&gt; Liveness -&gt; Maybe Liveness
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Liveness :: RegSet -&gt; RegSet -&gt; RegSet -&gt; Liveness
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#Liveness"><span class="hs-identifier hs-type">Liveness</span></a></span><span>
</span><span id="line-997"></span><span>                        </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">liveBorn :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveBorn"><span class="hs-identifier hs-var">liveBorn</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
forall a. UniqSet a
</span><a href="GHC.Types.Unique.Set.html#emptyUniqSet"><span class="hs-identifier hs-var">emptyUniqSet</span></a></span><span>
</span><span id="line-998"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">liveDieRead :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieRead"><span class="hs-identifier hs-var">liveDieRead</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021745"><span class="hs-identifier hs-var">r_dying_br</span></a></span><span>
</span><span id="line-999"></span><span>                        </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">liveDieWrite :: RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#liveDieWrite"><span class="hs-identifier hs-var">liveDieWrite</span></a></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021747"><span class="hs-identifier hs-var">w_dying</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-1000"></span><span>
</span><span id="line-1001"></span><span>        </span><span class="hs-keyword">where</span><span>
</span><span id="line-1002"></span><span>            </span><span class="hs-glyph">!</span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToAsm.Instr.html#RU"><span class="hs-identifier hs-type">RU</span></a></span><span> </span><span id="local-6989586621681021744"><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021744"><span class="hs-identifier hs-var">read</span></a></span></span><span> </span><span id="local-6989586621681021743"><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021743"><span class="hs-identifier hs-var">written</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Platform -&gt; InstrSR instr -&gt; RegUsage
forall instr. Instruction instr =&gt; Platform -&gt; instr -&gt; RegUsage
</span><a href="GHC.CmmToAsm.Instr.html#regUsageOfInstr"><span class="hs-identifier hs-var">regUsageOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">Platform
</span><a href="#local-6989586621681021754"><span class="hs-identifier hs-var">platform</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021751"><span class="hs-identifier hs-var">instr</span></a></span><span>
</span><span id="line-1003"></span><span>
</span><span id="line-1004"></span><span>            </span><span class="hs-comment">-- registers that were written here are dead going backwards.</span><span>
</span><span id="line-1005"></span><span>            </span><span class="hs-comment">-- registers that were read here are live going backwards.</span><span>
</span><span id="line-1006"></span><span>            </span><span id="local-6989586621681021749"><span class="annot"><span class="annottext">liveregs1 :: RegSet
</span><a href="#local-6989586621681021749"><span class="hs-identifier hs-var hs-var">liveregs1</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021753"><span class="hs-identifier hs-var">liveregs</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; [Reg] -&gt; RegSet
forall a. Uniquable a =&gt; UniqSet a -&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#delListFromUniqSet"><span class="hs-operator hs-var">`delListFromUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021743"><span class="hs-identifier hs-var">written</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1007"></span><span>                                    </span><span class="annot"><span class="annottext">RegSet -&gt; [Reg] -&gt; RegSet
forall a. Uniquable a =&gt; UniqSet a -&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#addListToUniqSet"><span class="hs-operator hs-var">`addListToUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021744"><span class="hs-identifier hs-var">read</span></a></span><span>
</span><span id="line-1008"></span><span>
</span><span id="line-1009"></span><span>            </span><span class="hs-comment">-- registers that are not live beyond this point, are recorded</span><span>
</span><span id="line-1010"></span><span>            </span><span class="hs-comment">--  as dying here.</span><span>
</span><span id="line-1011"></span><span>            </span><span id="local-6989586621681021748"><span class="annot"><span class="annottext">r_dying :: [Reg]
</span><a href="#local-6989586621681021748"><span class="hs-identifier hs-var hs-var">r_dying</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021740"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681021740"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021740"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021744"><span class="hs-identifier hs-var">read</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021740"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">Reg -&gt; [Reg] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#notElem"><span class="hs-operator hs-var">`notElem`</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021743"><span class="hs-identifier hs-var">written</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1012"></span><span>                              </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; RegSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-identifier hs-var">elementOfUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021740"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021753"><span class="hs-identifier hs-var">liveregs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1013"></span><span>
</span><span id="line-1014"></span><span>            </span><span id="local-6989586621681021747"><span class="annot"><span class="annottext">w_dying :: [Reg]
</span><a href="#local-6989586621681021747"><span class="hs-identifier hs-var hs-var">w_dying</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021738"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681021738"><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021738"><span class="hs-identifier hs-var">reg</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021743"><span class="hs-identifier hs-var">written</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-1015"></span><span>                             </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Reg -&gt; RegSet -&gt; Bool
forall a. Uniquable a =&gt; a -&gt; UniqSet a -&gt; Bool
</span><a href="GHC.Types.Unique.Set.html#elementOfUniqSet"><span class="hs-identifier hs-var">elementOfUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">Reg
</span><a href="#local-6989586621681021738"><span class="hs-identifier hs-var">reg</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021753"><span class="hs-identifier hs-var">liveregs</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-1016"></span><span>
</span><span id="line-1017"></span><span>            </span><span class="hs-comment">-- union in the live regs from all the jump destinations of this</span><span>
</span><span id="line-1018"></span><span>            </span><span class="hs-comment">-- instruction.</span><span>
</span><span id="line-1019"></span><span>            </span><span id="local-6989586621681021737"><span class="annot"><span class="annottext">targets :: [BlockId]
</span><a href="#local-6989586621681021737"><span class="hs-identifier hs-var hs-var">targets</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">InstrSR instr -&gt; [BlockId]
forall instr. Instruction instr =&gt; instr -&gt; [BlockId]
</span><a href="GHC.CmmToAsm.Instr.html#jumpDestsOfInstr"><span class="hs-identifier hs-var">jumpDestsOfInstr</span></a></span><span> </span><span class="annot"><span class="annottext">InstrSR instr
</span><a href="#local-6989586621681021751"><span class="hs-identifier hs-var">instr</span></a></span><span> </span><span class="hs-comment">-- where we go from here</span><span>
</span><span id="line-1020"></span><span>            </span><span id="local-6989586621681021750"><span class="annot"><span class="annottext">not_a_branch :: Bool
</span><a href="#local-6989586621681021750"><span class="hs-identifier hs-var hs-var">not_a_branch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[BlockId] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681021737"><span class="hs-identifier hs-var">targets</span></a></span><span>
</span><span id="line-1021"></span><span>
</span><span id="line-1022"></span><span>            </span><span id="local-6989586621681021736"><span class="annot"><span class="annottext">targetLiveRegs :: BlockId -&gt; RegSet
</span><a href="#local-6989586621681021736"><span class="hs-identifier hs-var hs-var">targetLiveRegs</span></a></span></span><span> </span><span id="local-6989586621681021735"><span class="annot"><span class="annottext">BlockId
</span><a href="#local-6989586621681021735"><span class="hs-identifier hs-var">target</span></a></span></span><span>
</span><span id="line-1023"></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap -&gt; BlockMap RegSet -&gt; Maybe RegSet
forall (map :: * -&gt; *) a.
IsMap map =&gt;
KeyOf map -&gt; map a -&gt; Maybe a
</span><a href="GHC.Cmm.Dataflow.Collections.html#mapLookup"><span class="hs-identifier hs-var">mapLookup</span></a></span><span> </span><span class="annot"><span class="annottext">KeyOf LabelMap
BlockId
</span><a href="#local-6989586621681021735"><span class="hs-identifier hs-var">target</span></a></span><span> </span><span class="annot"><span class="annottext">BlockMap RegSet
</span><a href="#local-6989586621681021752"><span class="hs-identifier hs-var">blockmap</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-1024"></span><span>                                </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681021734"><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021734"><span class="hs-identifier hs-var">ra</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021734"><span class="hs-identifier hs-var">ra</span></a></span><span>
</span><span id="line-1025"></span><span>                                </span><span class="annot"><span class="annottext">Maybe RegSet
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="GHC.CmmToAsm.Reg.Liveness.html#emptyRegSet"><span class="hs-identifier hs-var">emptyRegSet</span></a></span><span>
</span><span id="line-1026"></span><span>
</span><span id="line-1027"></span><span>            </span><span id="local-6989586621681021733"><span class="annot"><span class="annottext">live_from_branch :: RegSet
</span><a href="#local-6989586621681021733"><span class="hs-identifier hs-var hs-var">live_from_branch</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[RegSet] -&gt; RegSet
forall a. [UniqSet a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionManyUniqSets"><span class="hs-identifier hs-var">unionManyUniqSets</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(BlockId -&gt; RegSet) -&gt; [BlockId] -&gt; [RegSet]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">BlockId -&gt; RegSet
</span><a href="#local-6989586621681021736"><span class="hs-identifier hs-var">targetLiveRegs</span></a></span><span> </span><span class="annot"><span class="annottext">[BlockId]
</span><a href="#local-6989586621681021737"><span class="hs-identifier hs-var">targets</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1028"></span><span>
</span><span id="line-1029"></span><span>            </span><span id="local-6989586621681021746"><span class="annot"><span class="annottext">liveregs_br :: RegSet
</span><a href="#local-6989586621681021746"><span class="hs-identifier hs-var hs-var">liveregs_br</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021749"><span class="hs-identifier hs-var">liveregs1</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-operator hs-var">`unionUniqSets`</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021733"><span class="hs-identifier hs-var">live_from_branch</span></a></span><span>
</span><span id="line-1030"></span><span>
</span><span id="line-1031"></span><span>            </span><span class="hs-comment">-- registers that are live only in the branch targets should</span><span>
</span><span id="line-1032"></span><span>            </span><span class="hs-comment">-- be listed as dying here.</span><span>
</span><span id="line-1033"></span><span>            </span><span id="local-6989586621681021732"><span class="annot"><span class="annottext">live_branch_only :: RegSet
</span><a href="#local-6989586621681021732"><span class="hs-identifier hs-var hs-var">live_branch_only</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021733"><span class="hs-identifier hs-var">live_from_branch</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#minusUniqSet"><span class="hs-operator hs-var">`minusUniqSet`</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021753"><span class="hs-identifier hs-var">liveregs</span></a></span><span>
</span><span id="line-1034"></span><span>            </span><span id="local-6989586621681021745"><span class="annot"><span class="annottext">r_dying_br :: [Reg]
</span><a href="#local-6989586621681021745"><span class="hs-identifier hs-var hs-var">r_dying_br</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; [Reg]
forall elt. UniqSet elt -&gt; [elt]
</span><a href="GHC.Types.Unique.Set.html#nonDetEltsUniqSet"><span class="hs-identifier hs-var">nonDetEltsUniqSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Reg] -&gt; RegSet
forall a. Uniquable a =&gt; [a] -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#mkUniqSet"><span class="hs-identifier hs-var">mkUniqSet</span></a></span><span> </span><span class="annot"><span class="annottext">[Reg]
</span><a href="#local-6989586621681021748"><span class="hs-identifier hs-var">r_dying</span></a></span><span> </span><span class="annot"><span class="annottext">RegSet -&gt; RegSet -&gt; RegSet
forall a. UniqSet a -&gt; UniqSet a -&gt; UniqSet a
</span><a href="GHC.Types.Unique.Set.html#unionUniqSets"><span class="hs-operator hs-var">`unionUniqSets`</span></a></span><span>
</span><span id="line-1035"></span><span>                                             </span><span class="annot"><span class="annottext">RegSet
</span><a href="#local-6989586621681021732"><span class="hs-identifier hs-var">live_branch_only</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-1036"></span><span>                          </span><span class="hs-comment">-- See Note [Unique Determinism and code generation]</span><span>
</span><span id="line-1037"></span></pre></body></html>